Qore Programming Language Reference Manual 1.19.5
Loading...
Searching...
No Matches
ql_thread.dox.h
1
3namespace Qore {
5
7hashdecl CallStackInfo {
9 int endline;
11 string file;
13 string function;
15 string lang;
17 int line;
19 int offset;
23 string source;
27 string type;
30};
31}
32
34namespace Qore {
39
41
52
54
71nothing delete_thread_data( ...);
72
74
91nothing delete_thread_data(list<softstring> l);
92
94
104hash<string,list<hash<CallStackInfo>>> getAllThreadCallStacks();
105
107
130hash<string,list<hash<CallStackInfo>>> get_all_thread_call_stacks();
131
133
149
151
172
174
182*hash<CallStackInfo> get_parent_caller_location(int offset = 1);
183
185
209
211
233list<hash<CallStackInfo>> get_thread_call_stack();
234
236
249auto get_thread_data(string key);
250
252
260
262
286
288
307
309
324int gettid();
325
327
359
361
377
379
394*hash<auto> remove_thread_data( ...);
395
397
412hash<auto> remove_thread_data(list<softstring> l);
413
415
437bool remove_thread_resource(AbstractThreadResource resource);
438
440
462bool remove_thread_resource(code resource);
463
465
479nothing save_thread_data(hash<auto> h);
480
482
497nothing save_thread_data(string key, auto value);
498
500
508
510
531
533
555bool set_thread_init(*code init);
556
558
574nothing set_thread_name(string name);
575
577
597nothing set_thread_resource(AbstractThreadResource resource);
598
600
621nothing set_thread_resource(code resource, auto arg);
622
624
647
649
668
670
687list<int> thread_list();
688
690
700nothing thread_yield();
701
703
730
732
767
769
805
807}
The TimeZone class provides access to time zone functionality.
Definition: QC_TimeZone.dox.h:11
nothing set_thread_resource(AbstractThreadResource resource)
sets a thread resource for the current thread
nothing save_thread_data()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
nothing set_thread_tz()
Clears the thread-local time zone for the current thread; after this call TimeZone::get() will return...
nothing thread_yield()
yields the current thread so other threads can be scheduled and run
nothing set_thread_name(string name)
sets the current thread's descriptive name
nothing throwThreadResourceExceptions()
Immediately runs all thread resource cleanup routines for the current thread and throws all associate...
nothing throw_thread_resource_exceptions()
Immediately runs all thread resource cleanup routines for the current thread and throws all associate...
int num_threads()
Returns the current number of threads in the process (not including the special signal handling threa...
bool throw_thread_resource_exceptions_to_mark()
Immediately runs all thread resource cleanup routines for the current thread for thread resources cre...
nothing delete_all_thread_data()
Deletes all keys in the thread-local data hash.
*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...
*hash< CallStackInfo > get_parent_caller_location(int offset=1)
Returns information about the code in the callstack according to the offset argument.
*string get_thread_name()
returns the current thread's descriptive name if set or NOTHING if not
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...
int get_default_thread_stack_size()
returns the default thread stack size
hash< auto > get_all_thread_data()
Returns the entire thread-local data hash.
list< hash< CallStackInfo > > get_thread_call_stack()
Returns a list of CallStackInfo hashes for the current TID (thread ID)
hash< string, list< hash< CallStackInfo > > > get_all_thread_call_stacks()
Returns a hash of lists of CallStackInfo hashes keyed by TID (thread ID)
int gettid()
Returns the Qore thread ID (TID) of the current thread.
list< int > thread_list()
Returns a list of all current thread IDs.
int get_stack_size()
returns the current thread's stack size
hash< string, list< hash< CallStackInfo > > > getAllThreadCallStacks()
Returns a hash of lists of CallStackInfo hashes keyed by TID (thread ID)
*TimeZone get_thread_tz()
Returns any TimeZone set for the current thread, NOTHING if none is set.
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...
bool remove_thread_resource(AbstractThreadResource resource)
removes a thread resource from the current thread
bool set_thread_init(*code init)
Sets a call reference or closure to run every time a new thread is started.
nothing mark_thread_resources()
Marks thread resources so that any thread resources left allocated after this call will be cleaned up...
nothing get_thread_data()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore namespace.
Definition: QC_AbstractSmartLock.dox.h:2
call stack hash description
Definition: ql_thread.dox.h:7
int line
starting line number
Definition: ql_thread.dox.h:17
*int statementid
related statement id (since 0.8.13.7)
Definition: ql_thread.dox.h:25
string lang
the language of the source code; normally "Qore"
Definition: ql_thread.dox.h:15
int typecode
the call type; see Call Type Constants for possible values
Definition: ql_thread.dox.h:29
int offset
The line number offset for the "source" key (if known, for user code only)
Definition: ql_thread.dox.h:19
string function
function or method name
Definition: ql_thread.dox.h:13
int endline
ending line number
Definition: ql_thread.dox.h:9
string source
An optional source string; if multiple sections of a file were parsed with different parse labels,...
Definition: ql_thread.dox.h:23
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
string type
a type string; either "user", "builtin", "new-thread" or "rethrow" (for rethrown exceptions)
Definition: ql_thread.dox.h:27
*int programid
related program id (since 0.8.13.7)
Definition: ql_thread.dox.h:21