Category: ColdFusion
DBX 10.1.11 Released
01/23/2009A bug fix and a minor change:
- fixed miscalculation of total in database/table info pane
- changed sort in extended properties tab for 2005/2008 tables/views to match the ordinal position of the column
DBX 10.1.9 Released
12/09/2008Minor fix in this version:
- added handling for stored html content display in data sample tab
Programmatically kill a cfthread spawned from anywhere
12/09/2008In certain instances where you have endlessly running/sleeping
'monitoring' threads, there is effectively no way to kill them short of
a CF server cycle or via the CF8 server monitor.
I had this
issue during development where inside an app scoped component I was
creating two 'monitor' threads, which were charged with monitoring two
separate queues, sleeping every few seconds. Whenever the app scope
was reinitialized, two more threads would be created, up to the point
where all threads were utilized and the app bombed due to the lingering
(and idle) threads left from the previous instantiation.
CFThreads
are not application specific, they are bound to the server;
furthermore, multiple threads with the same name can be created in
different requests. In order to attempt to 'bind' a thread to a given
application, I recommend prefixing all threads with an
application-specific unique string prefix; this will allow you to use
the prefix argument of the UDF below and effectively kill only those threads which were
spawned from a particular application.
Given all this, I created the following UDF which allows you to kill any cfthread, either by name or by prefix string.