sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (Jira)" <j...@apache.org>
Subject [jira] [Updated] (SLING-9563) Simplify flow using InterruptedException
Date Thu, 02 Jul 2020 11:26:00 GMT

     [ 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)

Mime
View raw message