Skip to content

Block detection for methods annotated with @Blocking #10020

@sdelamo

Description

@sdelamo

We have an annotation @Blocking

  • A marker annotation for methods that are blocking.

@yawkat added a really useful PR to detect blocking usages of @BlockingClient in a Netty event loop thread.

BlockingHttpClient is annotated with @Blocking.

Micronaut Data's CrudRepository repository is annotated with @Blocking as well. We have other instances throughout the framework.

We could enhance the @yawkat block detector to detect when an application executes a method annotated with @Blocking in a Netty event loop thread and, in that case, throw an exception.

@micronaut-projects/core-developers thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions