How to run specific part of the SerialGC in a new thread?

Ofir Gordon ofirg6 at gmail.com
Thu Jul 30 07:07:35 UTC 2020


Hi,

It's a very late followup but I just got to work on it.
Thanks for the code example, it seems to work.
Is there a way to get the current thread's id, before activating the worker
and after activating it? Again, the normal cpp way using
std::this_thread::get_id() is not compiling (I can't seem to include
<thread> in the project..)
Also, is there a way to wait on a worker until it finishes? or does it
happen automatically since it initializes a "not concurrent" thread?

Thanks again,
Ofir

‫בתאריך יום ב׳, 6 ביולי 2020 ב-12:56 מאת ‪Thomas Schatzl‬‏ <‪
thomas.schatzl at oracle.com‬‏>:‬

> Hi,
>
> On 06.07.20 11:13, Thomas Schatzl wrote:
> > Hi,
> >
> >    sorry for the late answer, I started writing but then forgot to send
> > the email. :(
> >
> > On 30.06.20 10:27, Ofir Gordon wrote:
> >> I'll try to explain my end goal:
>
> [...]
>
> > WorkGang* w = new WorkGang("My Work Gang", 1, true, false);
> > w->initialize();
>
> A w->update_active_workers(1); may be missing here I think.
>
> Thanks,
>    Thomas
>



More information about the hotspot-gc-dev mailing list