tracker issue : CF-4079088

select a category, or use search below
(searches all categories and all time range)
Title:

Create new core function: isInThread() to easily tell if you are within a cfthread or not

| View in Tracker

Status/Resolution/Reason: To Fix//Investigate

Reporter/Name(from Bugbase): Luis Majano / Luis Majano (Luis Majano)

Created: 10/26/2015

Components: Language

Versions: 11.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Mac 10 All

Vote Count: 3

Create new core function: isInThread() to easily tell if you are within a cfthread or not

This would help tell you easily if you can instantiate a thread or not

if( isInThread() ){

 // execute 

} else {

// start a thread 
}

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4079088

External Customer Info:
External Company:  
External Customer Name: Luis Majano
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

+1 Vote must be between 25 and 4000 characters
Vote by External U.
5457 | November 04, 2015 03:50:13 AM GMT
+1 .............................
Vote by External U.
5458 | November 04, 2015 12:58:23 PM GMT
Needs review by me or you?
Comment by External U.
5454 | October 14, 2016 11:27:00 AM GMT
Why does this need review?
Comment by Luis M.
5455 | August 08, 2017 10:06:16 PM GMT
Or just check isDefined("thread") ? Do we *really* want to be adding even more top level functions? Shouldn't we be looking for a more OO solution to stuff like this? It's 2017, right? Also... should *your* code need to look outside of its own context and be worrying about whether it's being called in the main thread or a spawned thread?
Comment by Adam C.
5456 | August 08, 2017 10:39:27 PM GMT