setThreadAttributes - set threadAttributes for one or more thread objects to a common value after these threads have been created.


setThreadAttributes(..., attributes, priority, detach, stackSize, access, input, output, error, wait, mask )


a thread or threadGroup object or vector and lists containing objects these classes. This is the standard form for an arbitrary collection of thread objects passed to a function. If no values are passed to this argument (length of list(...) is 0), self() is assumed and the calling threads attributes are modified appropriately.
Rather than specifying the individual components of the threadAttributes object, an existing object can be passed to this function. Values in this object are overridden by specifying a value for the corresponding argument to this function of the same name as the slot in the threadAttributes object. See attributes for description of this class of object.
See priority for a description of this parameter.
See detach for a description of this parameter. This can be modified after creation of the thread.
can't be reset after creation! See stackSize,
See access for a description of this parameter.
See input for a description of this parameter.
See output for a description of this parameter.
See error for a description of this parameter.
if this is T, the call doesn't return until each thread whose attributes can be modified by this calling thread has notified the Evaluator Manager that it has assumed these changes. If the value is F, the requests are made asynchronously and the call returns immediately having made the requests. No receipt of request is returned.
ARGUMENT USED INTERNALLY IN "Recusrive Calls". Don't touch!

Return Value:

if wait is T, the value returned by each thread on evaluating the request is returned. For a given thread, if successful, the return value is T and so the return value for the call to mulitple threads

Side Effect:

A request is sent to each thread, if possible given the current access permissions, via sendTask() to set the threadAttributes for that thread.
           sendTask(substitute(setThreadAttributes(self(),attributes=attrs),list(attrs = attributes)),
                       thread = target)
Each target thread sends notification to the Evaluator manager and, if wait is T, a message back to the thread with the value of the original request evaluated in that target thread.

See Also:



      # change the output of a group of threads
      # can also be done by sending a request to each thread to evaluate a
      # call sink() with a common connection
     setThreadAttributes(tA,tB, output=file("common_output"),priority=20,wait=T)
      # now evaluate expressions in each of these tasks
       # lower the priority  of the child threads of this calling thread

Key Words:

User Level Thread Interface

Last modified: Mon Feb 10 16:35:45 1997