Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add thread that runs libuv loop continuously #50880

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Conversation

gbaraldi
Copy link
Member

@gbaraldi gbaraldi commented Aug 10, 2023

This is slightly speculative, but it fixes #50643 which is a start. But it hasn't been tested under heavy contention of the uv lock.
It also currently uses the normal mutex but we probably need to switch to a lock that has some form of fairness (maybe #50878 )

@brenhinkeller brenhinkeller added the multithreading Base.Threads and related functionality label Aug 10, 2023
@vchuravy vchuravy requested review from JeffBezanson and vtjnash and removed request for JeffBezanson August 11, 2023 15:08
src/jl_uv.c Show resolved Hide resolved
src/julia_threads.h Outdated Show resolved Hide resolved
src/partr.c Show resolved Hide resolved
@vtjnash
Copy link
Sponsor Member

vtjnash commented Aug 24, 2023

xref #35552

src/partr.c Outdated Show resolved Hide resolved
base/threadingconstructs.jl Outdated Show resolved Hide resolved
@gbaraldi gbaraldi changed the title Remove in threaded region and add a thread that runs the UV loop Add thread that runs libuv loop continuously Feb 7, 2024
@vchuravy
Copy link
Member

@gbaraldi maybe we should split some of the bug fixes out?

@algunion
Copy link

@gbaraldi,

I see this has been stale for some time.

Is this just a matter of evaluating the PR?

Is there additional work that I can help with?

P. S. I am somehow invested in this. Reason #50643.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Jul 24, 2024

This functionality is already merged (#53422 / 7f92880), though there was possibly comments here about bugfixes that Gabriel wanted to split out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
io Involving the I/O subsystem: libuv, read, write, etc. multithreading Base.Threads and related functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected sleep function behavior in relation to main thread activity in multithreading context
6 participants