ql_thread.dox.h
namespace Qore {
struct CallStackInfo {
int endline;
string file;
string function;
int line;
int offset;
string source;
string type;
int typecode;
};
};
namespace Qore {
nothing delete_all_thread_data();
nothing delete_thread_data( ...);
nothing delete_thread_data(list l);
hash<string,list<hash<CallStackInfo>>> getAllThreadCallStacks();
hash<string,list<hash<CallStackInfo>>> get_all_thread_call_stacks();
hash get_all_thread_data();
list<hash<CallStackInfo>> get_thread_call_stack();
auto get_thread_data(string key);
nothing get_thread_data();
*TimeZone get_thread_tz();
int gettid();
nothing mark_thread_resources();
int num_threads();
*hash remove_thread_data( ...);
hash remove_thread_data(list l);
bool remove_thread_resource(AbstractThreadResource resource);
bool remove_thread_resource(code resource);
nothing save_thread_data(hash h);
nothing save_thread_data(string key, auto value);
nothing save_thread_data();
bool set_thread_init(*code init);
nothing set_thread_resource(AbstractThreadResource resource);
nothing set_thread_resource(code resource, auto arg);
nothing set_thread_tz(TimeZone zone);
nothing set_thread_tz();
list<int> thread_list();
nothing thread_yield();
nothing throwThreadResourceExceptions();
nothing throw_thread_resource_exceptions();
bool throw_thread_resource_exceptions_to_mark();
};
Qore::remove_thread_resource
bool remove_thread_resource(AbstractThreadResource resource)
removes a thread resource from the current thread
Qore::CallStackInfo::line
int line
starting line number
Definition: ql_thread.dox.h:14
Qore::mark_thread_resources
nothing mark_thread_resources()
Marks thread resources so that any thread resources left allocated after this call will be cleaned up...
Qore::throwThreadResourceExceptions
nothing throwThreadResourceExceptions()
Immediately runs all thread resource cleanup routines for the current thread and throws all associate...
Qore::set_thread_tz
nothing set_thread_tz(TimeZone zone)
Sets the default time zone for the current thread.
Qore::delete_all_thread_data
nothing delete_all_thread_data()
Deletes all keys in the thread-local data hash.
Qore::get_thread_data
auto get_thread_data(string key)
Returns the value of the thread-local data attached to the key passed.
Qore::CallStackInfo::type
string type
a type string; either "user", "builtin", "new-thread" or "rethrow" (for rethrown exceptions) ...
Definition: ql_thread.dox.h:20
Qore::save_thread_data
nothing save_thread_data(hash h)
Saves the data passed in the thread-local hash; all keys are merged into the thread-local hash...
Qore::remove_thread_data
*hash remove_thread_data(...)
Removes the data associated to one or more keys in the thread-local data hash and returns the data re...
Qore::list
list list(...)
Returns an untyped list of the arguments passed at the top level.
Qore::num_threads
int num_threads()
Returns the current number of threads in the process (not including the special signal handling threa...
Qore::throw_thread_resource_exceptions
nothing throw_thread_resource_exceptions()
Immediately runs all thread resource cleanup routines for the current thread and throws all associate...
Qore::CallStackInfo::typecode
int typecode
the call type; see Call Type Constants for possible values
Definition: ql_thread.dox.h:22
Qore::CallStackInfo::file
string file
The parse label of the code; this is normally the file name; this corresponds to the label parameter ...
Definition: ql_thread.dox.h:10
Qore::thread_yield
nothing thread_yield()
yields the current thread so other threads can be scheduled and run
Qore::get_all_thread_call_stacks
hash< string, list< hash< CallStackInfo > > > get_all_thread_call_stacks()
Returns a hash of lists of CallStackInfo hashes keyed by TID (thread ID)
Qore::CallStackInfo::endline
int endline
ending line number
Definition: ql_thread.dox.h:8
Qore::CallStackInfo::source
string source
An optional source string; if multiple sections of a file were parsed with different parse labels...
Definition: ql_thread.dox.h:18
Qore::get_thread_call_stack
list< hash< CallStackInfo > > get_thread_call_stack()
Returns a list of CallStackInfo hashes for the current TID (thread ID); because it is always from the...
Qore::delete_thread_data
nothing delete_thread_data(...)
Deletes the data associated to one or more keys in the thread-local data hash; if the data is an obje...
Qore::CallStackInfo::offset
int offset
The line number offset for the "source" key (if known, for user code only)
Definition: ql_thread.dox.h:16
Qore::CallStackInfo
call stack hash description
Definition: ql_thread.dox.h:6
Qore::gettid
int gettid()
Returns the Qore thread ID (TID) of the current thread.
Qore::get_all_thread_data
hash get_all_thread_data()
Returns the entire thread-local data hash.
Qore::thread_list
list< int > thread_list()
Returns a list of all current thread IDs.
Qore::throw_thread_resource_exceptions_to_mark
bool throw_thread_resource_exceptions_to_mark()
Immediately runs all thread resource cleanup routines for the current thread for thread resources cre...
Qore::set_thread_init
bool set_thread_init(*code init)
Sets a call reference or closure to run every time a new thread is started.
Qore::set_thread_resource
nothing set_thread_resource(AbstractThreadResource resource)
sets a thread resource for the current thread
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
Qore::hash
hash hash(object obj)
Returns a hash of an object&#39;s members.
Qore::get_thread_tz
*TimeZone get_thread_tz()
Returns any TimeZone set for the current thread, NOTHING if none is set.
Qore::getAllThreadCallStacks
hash< string, list< hash< CallStackInfo > > > getAllThreadCallStacks()
Returns a hash of lists of CallStackInfo hashes keyed by TID (thread ID)