You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "John Wagenleitner (JIRA)" <ji...@apache.org> on 2016/05/06 18:48:13 UTC
[jira] [Commented] (GROOVY-7811) Block frequently occurs Groovy
multithreading capabilities of mixin
[ https://issues.apache.org/jira/browse/GROOVY-7811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15274558#comment-15274558 ]
John Wagenleitner commented on GROOVY-7811:
-------------------------------------------
I also see the blocking which seems expected, but no deadlocks. Just out of curiosity I tried removing the synchronized block and used an AtomicReference, that eliminates the blocking but did not have a significant boost in performance (not to mention it may not be correct since now the invalidSwitchPoints call could complete for a thread before the invalidation is done):
{code}
protected static final AtomicReference<SwitchPoint> switchPoint = new AtomicReference<SwitchPoint>(new SwitchPoint());
....
SwitchPoint old = switchPoint.get();
if (switchPoint.compareAndSet(old, new SwitchPoint())) {
SwitchPoint.invalidateAll(new SwitchPoint[]{old});
}
{code}
This doesn't seem like an issue.
> Block frequently occurs Groovy multithreading capabilities of mixin
> -------------------------------------------------------------------
>
> Key: GROOVY-7811
> URL: https://issues.apache.org/jira/browse/GROOVY-7811
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.4.6
> Reporter: 刘新宇
> Priority: Blocker
>
> Groovy:2.4.6
> please see : http://stackoverflow.com/questions/36419161/block-frequently-occurs-groovy-multithreading-capabilities-of-mixin#comment60481097_36419161
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)