RE: [coldbox:17267] [Announcement] ColdBox Connection Today: Asynch Interceptors

Doesn’t ColdFusion already do that natively with the “Maximum number of threads available for CFTHREAD” setting?



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

Yes but that is global and I think that each app should have it’s own pool so that it can be a good neighbor to other apps.


+1 on Judah’s suggestion. :slight_smile:


It wouldn’t matter, your other app could have 9 threads already running and then the moment you try to add your 2nd in the last app it will be queued before it handles the queues.

True enough. I just liked the idea of being able to set timeouts for my async tasks, manage how many threads I am using for my tasks, etc on a per-application basis. I imagine that things could be fine without it, it just seemed natural to me since I was using it for doing giant csv imports and would be firing off the parsing of the content very rapidly and dealing with thousands of events.


Cfthread does not give you the ability to do timeouts on a thread by thread case basis. Plus none of the internal ColdFusion library leverages any type of non blocking io libraries in java. This means that controlling threads is not as easy on blocking tasks like db, http, sockets etc.

The java concurrency classes allows you to control some of these threading aspects but you would still need to do more machinery for it.

If I needed massive multi threaded capabilities with monitoring, scaling etc I would probably go native. However, with current cfthread implementations you can achieve quite a lot. More in railo with no restrictions like cf.

Anyways, point is that is is just the start to adding more robust concurrency and threading capabilities in a simple and uniform API. We need more ideas, testing and collaboration.

Luis Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
Social: | |