31.05.2013 Views

jeeconf-May2013-concurrency

jeeconf-May2013-concurrency

jeeconf-May2013-concurrency

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Дело о бешеном потоке: #2<br />

Вах, вытаскиваем предикат в отдельный метод:<br />

Thread t1; Thread t2;<br />

def check() = T.cT().isInterrupted();<br />

while (!check()); t1.interrupt();<br />

И он «залипает»:<br />

не фейлится в C1, уверенно фейлится в C2 3<br />

break’и, модификаторы методов, etc.<br />

работают 50/50<br />

3 он же «серверный компилятор»<br />

Slide 33/73. Copyright c○ 2013, Oracle and/or its affiliates. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!