Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
1a0ec155
Commit
1a0ec155
authored
Apr 28, 2012
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
actor_registry::erase() removes the element instead of invalidating it
parent
dededb12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/actor_registry.cpp
src/actor_registry.cpp
+7
-1
No files found.
src/actor_registry.cpp
View file @
1a0ec155
...
...
@@ -101,7 +101,13 @@ void actor_registry::put(actor_id key, actor_ptr const& value)
void
actor_registry
::
erase
(
actor_id
key
)
{
exclusive_guard
guard
(
m_instances_mtx
);
m_instances
.
insert
(
std
::
pair
<
actor_id
,
actor_ptr
>
(
key
,
nullptr
));
auto
i
=
std
::
find_if
(
m_instances
.
begin
(),
m_instances
.
end
(),
[
=
](
std
::
pair
<
actor_id
,
actor_ptr
>
const
&
p
)
{
return
p
.
first
==
key
;
});
if
(
i
!=
m_instances
.
end
())
m_instances
.
erase
(
i
);
}
std
::
uint32_t
actor_registry
::
next_id
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment