[ 
https://issues.apache.org/jira/browse/PIG-1973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022373#comment-13022373
 ] 

Richard Ding commented on PIG-1973:
-----------------------------------

I agree that this is a better usage idiom. But the initialValue method is 
invoked the first time a thread accesses the ThreadLocal variable with the get 
method, so the outcomes are the same. 

> UDFContext.getUDFContext has a thread race condition around it's ThreadLocal
> ----------------------------------------------------------------------------
>
>                 Key: PIG-1973
>                 URL: https://issues.apache.org/jira/browse/PIG-1973
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.8.0, 0.9.0
>            Reporter: Woody Anderson
>            Assignee: Woody Anderson
>            Priority: Minor
>             Fix For: 0.9.0
>
>         Attachments: 1973.patch
>
>
> this is probably isn't manifesting anywhere, but it's an incorrect use of the 
> ThreadLocal pattern.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to