Skip to content

[wip] support using tasks on threads (2/3)#30838

Merged
JeffBezanson merged 1 commit intojn/task-llfrom
jn/task-thread
Mar 18, 2019
Merged

[wip] support using tasks on threads (2/3)#30838
JeffBezanson merged 1 commit intojn/task-llfrom
jn/task-thread

Conversation

@vtjnash
Copy link
Copy Markdown
Member

@vtjnash vtjnash commented Jan 25, 2019

Thread-safety for Workqueue, permit interacting with Tasks from threads

TODO:

  • merge InvasiveLinkedListSynchronized into InvasiveLinkedList

@ararslan ararslan added the multithreading Base.Threads and related functionality label Jan 25, 2019
@kpamnany
Copy link
Copy Markdown
Member

Haha, it's good ol' task_done_hook().

You're trying to support old-style threaded loops with these multiple Workqueues? I don't really understand the why of these changes.

@vtjnash
Copy link
Copy Markdown
Member Author

vtjnash commented Feb 15, 2019

The old Workqueue (extended here to threads) should be the same as the partr sticky queue, I'm just keeping more of the implementation in Julia here.

base/boot.jl Outdated

function Task(@nospecialize(f), reserved_stack::Int=0)
return ccall(:jl_new_task, Ref{Task}, (Any, Int), f, reserved_stack)
function Task(@nospecialize(f), reserved_stack::Int, completion_future)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't want to expose this argument --- should either rename this method or assign the field in the other Task constructor.

@JeffBezanson JeffBezanson merged commit baf0caa into jn/task-ll Mar 18, 2019
@StefanKarpinski StefanKarpinski deleted the jn/task-thread branch March 18, 2019 21:18
JeffBezanson pushed a commit that referenced this pull request Mar 19, 2019
raphbacher pushed a commit to raphbacher/julia that referenced this pull request Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multithreading Base.Threads and related functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants