RFR: 8283044: Use asynchronous handshakes to deliver asynchronous exceptions [v5]

David Holmes dholmes at openjdk.java.net
Wed Mar 30 01:08:41 UTC 2022


On Tue, 29 Mar 2022 18:40:09 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> My original thought was to have the filter in the specific handshake:
>> 
>> class MyHandshake : public HandshakeClosure {
>> public:
>>   MyHandshake(Handle throwable) : HandshakeClosure("MyHandshake") {}
>>   void do_thread(Thread* thr) {}
>>   bool executeable_for_context(JavaThreadState from, JavaThreadState to, ...) {
>>   	return to == _thread_in_Java;
>>   }
>> };
>> 
>> 
>> This would keep what and when together.
>
> But what would you do if different Handshakes needed the same filter?

I don't see that as a problem Dan. Each handshake operation can have constraints on when that operation can actually be performed. When we reach a particular handshake "poll point" the logic says "give me the next queued handshake operation that is enabled 'here' ". What I hadn't considered was how to express "here" in a way that the handshake operation could use it to decide whether it was enabled or not i.e. whether there current "poll point" allows for throwing an async exception.
Anyway this is future work.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7930


More information about the hotspot-runtime-dev mailing list