| Qore Programming Language Reference Manual 1.0.8

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;
25 *int statementid;
27 string type;
29 int typecode;
30 };
31 }
32
34 namespace Qore {
38
40
51 nothing delete_all_thread_data();
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
165 int get_default_thread_stack_size();
166
168
187 int get_stack_size();
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
282 *TimeZone get_thread_tz();
283
285
300 int gettid();
301
303
334 nothing mark_thread_resources();
335
337
352 int num_threads();
353
355
369 *hash<auto> remove_thread_data( ...);
370
372
386 hash<auto> remove_thread_data(list<softstring> l);
387
389
411 bool remove_thread_resource(AbstractThreadResource resource);
412
414
436 bool remove_thread_resource(code resource);
437
439
451 nothing save_thread_data(hash<auto> h);
452
454
467 nothing save_thread_data(string key, auto value);
468
470
477 nothing save_thread_data();
478
480
500 int set_default_thread_stack_size(int size);
501
503
523 bool set_thread_init(*code init);
524
526
542 nothing set_thread_name(string name);
543
545
565 nothing set_thread_resource(AbstractThreadResource resource);
566
568
589 nothing set_thread_resource(code resource, auto arg);
590
592
614 nothing set_thread_tz(TimeZone zone);
615
617
635 nothing set_thread_tz();
636
638
655 list<int> thread_list();
656
658
668 nothing thread_yield();
669
671
694 nothing throwThreadResourceExceptions();
695
697
727 nothing throw_thread_resource_exceptions();
728
730
764 bool throw_thread_resource_exceptions_to_mark();
765
767 }
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:17
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::get_all_thread_data
hash< auto > get_all_thread_data()
Returns the entire thread-local data hash.
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::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_default_thread_stack_size
int get_default_thread_stack_size()
returns the default thread stack size
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::CallStackInfo::lang
string lang
the language of the source code; normally "Qore"
Definition: ql_thread.dox.h:15
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::get_stack_size
int get_stack_size()
returns the current thread&#39;s stack size
Qore::CallStackInfo::typecode
int typecode
the call type; see Call Type Constants for possible values
Definition: ql_thread.dox.h:29
Qore::CallStackInfo::programid
*int programid
related program id (since 0.8.13.7)
Definition: ql_thread.dox.h:21
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_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:9
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::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::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::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::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::CallStackInfo
call stack hash description
Definition: ql_thread.dox.h:7
Qore::gettid
int gettid()
Returns the Qore thread ID (TID) of the current thread.
Qore::thread_list
list< int > thread_list()
Returns a list of all current thread IDs.
Qore::set_thread_name
nothing set_thread_name(string name)
sets the current thread&#39;s descriptive name
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:3
Qore::get_thread_name
*string get_thread_name()
returns the current thread&#39;s descriptive name if set or NOTHING if not
Qore::get_thread_tz
*TimeZone get_thread_tz()
Returns any TimeZone set for the current thread, NOTHING if none is set.
Qore::CallStackInfo::statementid
*int statementid
related statement id (since 0.8.13.7)
Definition: ql_thread.dox.h:25
Qore::getAllThreadCallStacks
hash< string, list< hash< CallStackInfo > > > getAllThreadCallStacks()
Returns a hash of lists of CallStackInfo hashes keyed by TID (thread ID)