Skip to content

Make workerqueue cancellable if not started already configurable #4297

Open
@soulomoon

Description

@soulomoon
          >  it's pretty much identical to having a resource that's guarded by a lock

yes, with a bit different, enqueued actions would not be cancelled even if the thread (enqueue it) is cancelled.

It reminds me of something, we might probably want to limit some of the queue size to 1, so the waiting to enqueue action can be cancelled when we are doing shakeRestart. Then less likely a duplicated action would be run for the sessionLoadQueue
But maybe in another PR, we might need to come up with some design, such as we might need a bit wrapping to do over TQueue and TMVar if we do it this way.

Originally posted by @soulomoon in #4256 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions