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 the ability to call custom code in scheduler dynamic context #7

Closed
wants to merge 1 commit into from
Closed

Conversation

amirouche
Copy link
Contributor

The idea behind that is to make it possible, to set the value of a fluid
in the dynamic context of schedulers.

The idea behind that is to make it possible, to set the value of a fluid
in the dynamic context of schedulers.
(for-each (lambda (sched affinity)
(call-with-new-thread
(lambda ()
(and thread-init (thread-init))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should probably go inside %run-fibers actuallly.

@wingo
Copy link
Owner

wingo commented Feb 21, 2017

AFAIU what you need is a database connection, right? Why not make a non-fibers threadpool and communicate with that threadpool over channels?

I don't think this patch will solve your problems as each fiber has its own dynamic state. The dynamic state of the thread running the scheduler actually isn't visible to the fibers that the schedulers run!

@amirouche
Copy link
Contributor Author

The dynamic state of the thread running the scheduler actually isn't visible to the fibers that the schedulers run!

bummer!

what you need is a database connection, right?

yes, but the interface is not a port.

Why not make a non-fibers threadpool and communicate with that threadpool over channels?

Maybe I will think about it.

@amirouche amirouche closed this Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants