Skip to content

What are nesting factories used for? #816

Answered by AArnott
weltkante asked this question in Q&A
Discussion options

You must be logged in to vote

Creating multiple instances from distinct JoinableTaskContext (different UI threads?)

This is not the reason. Multiple instances of JoinableTaskContext never talk to each other. If you have two threads in the process that each have a single-threaded SynchronizationContext applied, then conceivably two JoinableTaskContext instances may apply in that process, but they will not communicate and deadlocks may result if any code needs both threads to complete.

I'd have expected the set of nesting JoinableTaskContext to be stored, not the set of nesting JoinableTaskFactory.

There is no such thing as nested JoinableTaskContext. The contract is to have exactly one for a designated thread.

You may

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@weltkante
Comment options

Comment options

You must be logged in to vote
1 reply
@weltkante
Comment options

Answer selected by weltkante
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #814 on March 30, 2021 17:32.