| Qore Programming Language Reference Manual 2.2.0

Loading...
Searching...
No Matches
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 {
39
41
50 bool active_exception();
51
53
63nothing delete_all_thread_data();
64
66
83nothing delete_thread_data( ...);
84
86
103nothing delete_thread_data(list<softstring> l);
104
106
116 hash<string,list<hash<CallStackInfo>>> getAllThreadCallStacks();
117
119
142 hash<string,list<hash<CallStackInfo>>> get_all_thread_call_stacks();
143
145
160 hash<auto> get_all_thread_data();
161
163
183 int get_default_thread_stack_size();
184
186
194*hash<CallStackInfo> get_parent_caller_location(int offset = 1);
195
197
220 int get_stack_size();
221
223
245 list<hash<CallStackInfo>> get_thread_call_stack();
246
248
261 auto get_thread_data(string key);
262
264
271nothing get_thread_data();
272
274
297*string get_thread_name();
298
300
318*TimeZone get_thread_tz();
319
321
336 int gettid();
337
339
370nothing mark_thread_resources();
371
373
388 int num_threads();
389
391
406*hash<auto> remove_thread_data( ...);
407
409
424 hash<auto> remove_thread_data(list<softstring> l);
425
427
449 bool remove_thread_resource(AbstractThreadResource resource);
450
452
474 bool remove_thread_resource(code resource);
475
477
491nothing save_thread_data(hash<auto> h);
492
494
509nothing save_thread_data(string key, auto value);
510
512
519nothing save_thread_data();
520
522
542 int set_default_thread_stack_size(int size);
543
545
567 bool set_thread_init(*code init);
568
570
586nothing set_thread_name(string name);
587
589
609nothing set_thread_resource(AbstractThreadResource resource);
610
612
633nothing set_thread_resource(code resource, auto arg);
634
636
658nothing set_thread_tz(TimeZone zone);
659
661
679nothing set_thread_tz();
680
682
699 list<int> thread_list();
700
702
712nothing thread_yield();
713
715
741nothing throwThreadResourceExceptions();
742
744
778nothing throw_thread_resource_exceptions();
779
781
816 bool throw_thread_resource_exceptions_to_mark();
817
819}
Qore::TimeZone
The TimeZone class provides access to time zone functionality.
Definition QC_TimeZone.dox.h:11
Qore::set_thread_resource
nothing set_thread_resource(AbstractThreadResource resource)
sets a thread resource for the current thread
Qore::save_thread_data
nothing save_thread_data()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::set_thread_tz
nothing set_thread_tz()
Clears the thread-local time zone for the current thread; after this call TimeZone::get() will return...
Qore::thread_yield
nothing thread_yield()
yields the current thread so other threads can be scheduled and run
Qore::set_thread_name
nothing set_thread_name(string name)
sets the current thread's descriptive name
Qore::throwThreadResourceExceptions
nothing throwThreadResourceExceptions()
Immediately runs all thread resource cleanup routines for the current thread and throws all associate...
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::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_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::delete_all_thread_data
nothing delete_all_thread_data()
Deletes all keys in the thread-local data hash.
Qore::active_exception
bool active_exception()
Returns True if there is an active exception for the current thread.
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::get_parent_caller_location
*hash< CallStackInfo > get_parent_caller_location(int offset=1)
Returns information about the code in the callstack according to the offset argument.
Qore::get_thread_name
*string get_thread_name()
returns the current thread's descriptive name if set or NOTHING if not
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_default_thread_stack_size
int get_default_thread_stack_size()
returns the default thread stack size
Qore::get_all_thread_data
hash< auto > get_all_thread_data()
Returns the entire thread-local data 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)
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::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::get_stack_size
int get_stack_size()
returns the current thread's stack size
Qore::getAllThreadCallStacks
hash< string, list< hash< CallStackInfo > > > getAllThreadCallStacks()
Returns a hash of lists of CallStackInfo hashes keyed by TID (thread ID)
Qore::get_thread_tz
*TimeZone get_thread_tz()
Returns any TimeZone set for the current thread, NOTHING if none is set.
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::remove_thread_resource
bool remove_thread_resource(AbstractThreadResource resource)
removes a thread resource from the current thread
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::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
nothing get_thread_data()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::hash
hash< auto > hash(object obj)
Returns a hash of an object's members.
Qore::list
list< auto > list(...)
Returns a list of the arguments passed at the top level.
Qore
main Qore-language namespace
Definition Pseudo_QC_All.dox.h:3
Qore::CallStackInfo
call stack hash description
Definition ql_thread.dox.h:7
Qore::CallStackInfo::line
int line
starting line number
Definition ql_thread.dox.h:17
Qore::CallStackInfo::statementid
*int statementid
related statement id (since 0.8.13.7)
Definition ql_thread.dox.h:25
Qore::CallStackInfo::lang
string lang
the language of the source code; normally "Qore"
Definition ql_thread.dox.h:15
Qore::CallStackInfo::typecode
int typecode
the call type; see Call Type Constants for possible values
Definition ql_thread.dox.h:29
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::function
string function
function or method name
Definition ql_thread.dox.h:13
Qore::CallStackInfo::endline
int endline
ending line number
Definition ql_thread.dox.h:9
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::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::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::programid
*int programid
related program id (since 0.8.13.7)
Definition ql_thread.dox.h:21