clj-commons / manifold

A compatibility layer for event-driven abstractions
1.02k stars 108 forks source link

Is the wait-pool public API, and can I use that for other libraries? #84

Closed lvh closed 8 years ago

lvh commented 8 years ago

I have an existing Java library that produces Future<SomeSillyObjectThatShouldveBeenAMap>. That library takes an ExecutorService to run its futures on. That seems like something manifold wants too; I'm guessing that wait-pool either has an unbounded queue or unbounded threads so it can park threads ad nauseam. Is it OK to use the same pool, and if so, can I use the one Manifold exposes?

The documentation suggests that these pools (including wait-pool) is lazily created when particular manifold APIs are invoked, which leads me to believe that maybe these are considered internal details, and I should just go create my own pool.

ztellman commented 8 years ago

I think it's best to treat those as an implementation detail, and not use them directly. If you need something similar, just create your own.