juxt / clip

Light structure and support for dependency injection
MIT License
228 stars 15 forks source link

Suspend / resume support #1

Closed SevereOverfl0w closed 4 years ago

SevereOverfl0w commented 5 years ago

I've not heavily used this myself in integrant, excepting when I wrote a component wrapping https://github.com/opentable/otj-pg-embedded. This is an uncommon use-case to my knowledge.

(Requested by @dharrigan)

SevereOverfl0w commented 4 years ago

This is a pre-requisite to supporting the use of figwheel-main inside a system too.

Both of these use-cases would be better supported by some notion of a global singleton, akin to how https://github.com/riverford/objection works.

SevereOverfl0w commented 4 years ago

I no longer think this is a useful feature. I'm yet to see an application of suspend/resume which isn't for tools which make more sense being completely separate from the system anyway e.g. figwheel and sass file watcher. There may be problems which might be solved by suspend/resumed, but I'd like to address those once raised.

SevereOverfl0w commented 3 years ago

Thread pools and slow-to-stop background threads fall into this category. They're not fast to stop, but are reasonably quick to start. They would benefit dramatically from this functionality. They're also reset-dependent not on ns changes, but option changes (e.g. thread count)