mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8215047: Task terminators do not complete termination in consistent state
Reviewed-by: tschatzl, minqi
This commit is contained in:
parent
c9ad677866
commit
5c78491bd7
4 changed files with 56 additions and 17 deletions
|
@ -467,11 +467,18 @@ protected:
|
|||
virtual void yield();
|
||||
void sleep(uint millis);
|
||||
|
||||
// Called when exiting termination is requested.
|
||||
// When the request is made, terminator may have already terminated
|
||||
// (e.g. all threads are arrived and offered termination). In this case,
|
||||
// it should ignore the request and complete the termination.
|
||||
// Return true if termination is completed. Otherwise, return false.
|
||||
bool complete_or_exit_termination();
|
||||
public:
|
||||
|
||||
// "n_threads" is the number of threads to be terminated. "queue_set" is a
|
||||
// queue sets of work queues of other threads.
|
||||
ParallelTaskTerminator(uint n_threads, TaskQueueSetSuper* queue_set);
|
||||
virtual ~ParallelTaskTerminator();
|
||||
|
||||
// The current thread has no work, and is ready to terminate if everyone
|
||||
// else is. If returns "true", all threads are terminated. If returns
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue