setThreadAttributes - set
threadAttributes for one or more thread
objects to a common value after these threads
have been created.
list(...)
is 0), self() is assumed and the
calling threads attributes are modified appropriately.
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.
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
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.
# 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
sendTask(Quote(print(lm(x[[1]],y[[1]]))),tA)
sendTask(Quote(print(lm(x[[2]],y[[2]]))),tB)
|
|---|
# lower the priority of the child threads of this calling thread
setThreadAttributes(children(),priority=1)
|