You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Christian Schneider (Jira)" <ji...@apache.org> on 2020/07/02 11:26:00 UTC

[jira] [Updated] (SLING-9563) Simplify flow using InterruptedException

     [ https://issues.apache.org/jira/browse/SLING-9563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schneider updated SLING-9563:
---------------------------------------
    Description: 
When we avoided interrupting the thread in DistributionSubscriber we made the code more complex by adding some ifs for blockingSendStoredStatus and blockingPeekQueueItem.

I propose to replace the ifs by throwing an InterruptedException. This way we achieve the same result of cleanly exiting the thread while avoiding the ifs.

Additionally I would like to make another change to call subscriberIdle only from one method. This makes it easier to grasp how it works.

  was:
When we avoided interrupting the thread in DistributionSubscriber we made the code more complex by adding some ifs for blockingSendStoredStatus and blockingPeekQueueItem.

I propose to replace the ifs by throwing an InterruptedException. This way we achieve the same result of cleanly exiting the thread while avoiding the ifs.

 


> Simplify flow using InterruptedException
> ----------------------------------------
>
>                 Key: SLING-9563
>                 URL: https://issues.apache.org/jira/browse/SLING-9563
>             Project: Sling
>          Issue Type: Improvement
>          Components: Content Distribution
>    Affects Versions: Content Distribution Journal Core 0.1.16
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>            Priority: Major
>             Fix For: Content Distribution Journal Core 0.1.18
>
>
> When we avoided interrupting the thread in DistributionSubscriber we made the code more complex by adding some ifs for blockingSendStoredStatus and blockingPeekQueueItem.
> I propose to replace the ifs by throwing an InterruptedException. This way we achieve the same result of cleanly exiting the thread while avoiding the ifs.
> Additionally I would like to make another change to call subscriberIdle only from one method. This makes it easier to grasp how it works.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)