Qore Programming Language Reference Manual  0.9.4.6
ql_thread.dox.h
1 
3 namespace Qore {
5 
7 struct CallStackInfo {
9  int endline;
11  string file;
13  string function;
15  string lang;
17  int line;
19  int offset;
21  *int programid;
23  string source;
27  string type;
29  int typecode;
30 };
31 }
32 
34 namespace Qore {
40 
52 
54 
68 nothing delete_thread_data( ...);
69 
71 
85 nothing delete_thread_data(list<softstring> l);
86 
88 
98 hash<string,list<hash<CallStackInfo>>> getAllThreadCallStacks();
99 
101 
124 hash<string,list<hash<CallStackInfo>>> get_all_thread_call_stacks();
125 
127 
142 hash<auto> get_all_thread_data();
143 
145 
166 
168 
188 
190 
209 list<hash<CallStackInfo>> get_thread_call_stack();
210 
212 
225 auto get_thread_data(string key);
226 
228 
235 nothing get_thread_data();
236 
238 
261 *string get_thread_name();
262 
264 
283 
285 
300 int gettid();
301 
303 
336 
338 
354 
356 
370 *hash<auto> remove_thread_data( ...);
371 
373 
387 hash<auto> remove_thread_data(list<softstring> l);
388 
390 
412 bool remove_thread_resource(AbstractThreadResource resource);
413 
415 
437 bool remove_thread_resource(code resource);
438 
440 
452 nothing save_thread_data(hash<auto> h);
453 
455 
468 nothing save_thread_data(string key, auto value);
469 
471 
479 
481 
502 
504 
524 bool set_thread_init(*code init);
525 
527 
543 nothing set_thread_name(string name);
544 
546 
566 nothing set_thread_resource(AbstractThreadResource resource);
567 
569 
590 nothing set_thread_resource(code resource, auto arg);
591 
593 
615 nothing set_thread_tz(TimeZone zone);
616 
618 
636 nothing set_thread_tz();
637 
639 
656 list<int> thread_list();
657 
659 
669 nothing thread_yield();
670 
672 
696 
698 
730 
732 
768 
770 }
Qore::CallStackInfo::typecode
int typecode
the call type; see Call Type Constants for possible values
Definition: ql_thread.dox.h:29
Qore::CallStackInfo::statementid
*int statementid
related statement id (since 0.8.13.7)
Definition: ql_thread.dox.h:25
Qore::CallStackInfo::type
string type
a type string; either "user", "builtin", "new-thread" or "rethrow" (for rethrown exceptions)
Definition: ql_thread.dox.h:27
Qore::set_default_thread_stack_size
int set_default_thread_stack_size(int size)
sets the default thread stack size for new threads created after this call and returns the stack size...
Qore::get_all_thread_data
hash< auto > get_all_thread_data()
Returns the entire thread-local data hash.
Qore::CallStackInfo::programid
*int programid
related program id (since 0.8.13.7)
Definition: ql_thread.dox.h:21
Qore::delete_all_thread_data
nothing delete_all_thread_data()
Deletes all keys in the thread-local data hash.
Qore::CallStackInfo
call stack hash description
Definition: ql_thread.dox.h:7
Qore::CallStackInfo::lang
string lang
the language of the source code; normally "Qore"
Definition: ql_thread.dox.h:15
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::get_default_thread_stack_size
int get_default_thread_stack_size()
returns the default thread stack size
Qore::thread_yield
nothing thread_yield()
yields the current thread so other threads can be scheduled and run
Qore::save_thread_data
nothing save_thread_data(hash< auto > h)
Saves the data passed in the thread-local hash; all keys are merged into the thread-local hash,...
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::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::get_stack_size
int get_stack_size()
returns the current thread's stack size
Qore::CallStackInfo::endline
int endline
ending line number
Definition: ql_thread.dox.h:9
Qore::remove_thread_data
*hash< auto > remove_thread_data(...)
Removes the data associated to one or more keys in the thread-local data hash and returns the data re...
Qore::num_threads
int num_threads()
Returns the current number of threads in the process (not including the special signal handling threa...
Qore::gettid
int gettid()
Returns the Qore thread ID (TID) of the current thread.
Qore::TimeZone
The TimeZone class provides access to time zone functionality.
Definition: QC_TimeZone.dox.h:11
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_name
nothing set_thread_name(string name)
sets the current thread's descriptive name
Qore::get_thread_name
*string get_thread_name()
returns the current thread's descriptive name if set or NOTHING if not
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:23
Qore::CallStackInfo::line
int line
starting line number
Definition: ql_thread.dox.h:17
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:11
Qore::thread_list
list< int > thread_list()
Returns a list of all current thread IDs.
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::throwThreadResourceExceptions
nothing throwThreadResourceExceptions()
Immediately runs all thread resource cleanup routines for the current thread and throws all associate...
Qore::get_thread_tz
*TimeZone get_thread_tz()
Returns any TimeZone set for the current thread, NOTHING if none is set.
Qore::set_thread_resource
nothing set_thread_resource(AbstractThreadResource resource)
sets a thread resource for the current thread
Qore::set_thread_tz
nothing set_thread_tz(TimeZone zone)
Sets the default time zone for the current thread.
Qore::CallStackInfo::offset
int offset
The line number offset for the "source" key (if known, for user code only)
Definition: ql_thread.dox.h:19
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
Qore::remove_thread_resource
bool remove_thread_resource(AbstractThreadResource resource)
removes a thread resource from the current thread
Qore::getAllThreadCallStacks
hash< string, list< hash< CallStackInfo > > > getAllThreadCallStacks()
Returns a hash of lists of CallStackInfo hashes keyed by TID (thread ID)
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::get_thread_data
auto get_thread_data(string key)
Returns the value of the thread-local data attached to the key passed.