Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Remove stately from queue internals #41

Merged
merged 10 commits into from
Dec 22, 2019
Merged

Conversation

benasher44
Copy link
Contributor

In the one case I needed a lock and shared collection, I switched to a Worker and a mutable (only accessed from that Worker) linked list. Otherwise, I switched to a lock-free implementation and used available native primitives.

@@ -19,7 +18,7 @@ import kotlinx.coroutines.runBlocking
* Holds the hook for handling background uncaught exceptions
*/
@SharedImmutable
private val UNHANDLE_EXCEPTION_HOOK = AtomicReference<((Throwable) -> Unit)?>(null)
private val UNHANDLED_EXCEPTION_HOOK = AtomicReference<((Throwable) -> Unit)?>(null)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

naming fix

@@ -18,12 +16,12 @@ private class WeightedWorker(
val lastSequence = AtomicLong(0)

/** Number of blocks queued on this worker */
val numBlocksQueue = AtomicLong(0)
val numBlocksQueued = AtomicLong(0)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

naming fix

@benasher44 benasher44 changed the base branch from basher/refactor-cancel to master December 22, 2019 02:34
@benasher44 benasher44 merged commit ceaa4c7 into master Dec 22, 2019
@benasher44 benasher44 deleted the basher/refactor-queue branch December 22, 2019 02:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants