Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
las3_pub
/
predictable_parallel_patterns
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
51b919f0
authored
Jun 12, 2019
by
FritzFlorian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue when re-using the main-thread and terminating the scheduler
parent
41b2f354
Pipeline
#1263
failed with stages
in 49 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
lib/pls/include/pls/internal/data_structures/locking_deque.h
+1
-1
lib/pls/src/internal/scheduling/scheduler.cpp
+3
-0
No files found.
lib/pls/include/pls/internal/data_structures/locking_deque.h
View file @
51b919f0
...
@@ -58,7 +58,7 @@ class locking_deque {
...
@@ -58,7 +58,7 @@ class locking_deque {
"Must only push types of <Item> onto work_stealing_deque<Item>"
);
"Must only push types of <Item> onto work_stealing_deque<Item>"
);
std
::
lock_guard
<
base
::
spin_lock
>
lock
{
lock_
};
std
::
lock_guard
<
base
::
spin_lock
>
lock
{
lock_
};
auto
deque_item
=
stack_
->
push
(
locking_deque_container
<
Item
,
T
>
{
new_item
}
);
auto
deque_item
=
stack_
->
push
<
locking_deque_container
<
Item
,
T
>>
(
new_item
);
deque_item
->
item_
=
&
deque_item
->
content_
;
deque_item
->
item_
=
&
deque_item
->
content_
;
if
(
tail_
!=
nullptr
)
{
if
(
tail_
!=
nullptr
)
{
...
...
lib/pls/src/internal/scheduling/scheduler.cpp
View file @
51b919f0
...
@@ -81,6 +81,9 @@ void scheduler::terminate(bool wait_for_workers) {
...
@@ -81,6 +81,9 @@ void scheduler::terminate(bool wait_for_workers) {
if
(
wait_for_workers
)
{
if
(
wait_for_workers
)
{
for
(
unsigned
int
i
=
0
;
i
<
num_threads_
;
i
++
)
{
for
(
unsigned
int
i
=
0
;
i
<
num_threads_
;
i
++
)
{
if
(
reuse_thread_
&&
i
==
0
)
{
continue
;
}
memory_
->
thread_for
(
i
)
->
join
();
memory_
->
thread_for
(
i
)
->
join
();
}
}
}
}
...
...
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