RFR: 8283044: Use asynchronous handshakes to deliver asynchronous exceptions [v4]
Daniel D.Daugherty
dcubed at openjdk.java.net
Tue Mar 29 18:49:52 UTC 2022
On Tue, 29 Mar 2022 08:29:04 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> Aside: as the handshake filtering mechanism is growing this doesn't look like a scalable approach to dealing with filters - we can't keep adding hardwired filter functions and new parameters to get_op_for_self and its callers. get_op_for_self should be taking a filtering object which in turn is used by queue.peek() to determine what can be returned. Perhaps a use for C++ lambdas?
>
> 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?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7930
More information about the hotspot-runtime-dev
mailing list