streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfranklin <...@git.apache.org>
Subject [GitHub] incubator-streams pull request: Streams 86
Date Mon, 19 May 2014 19:37:11 GMT
Github user mfranklin commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/17#discussion_r12812061
  
    --- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
---
    @@ -246,9 +281,15 @@ public void prepare(Object o) {
             includeEntitiesEnabled = Optional.fromNullable(new Boolean(Boolean.parseBoolean(config.getIncludeEntities()))).or(true);
     
             client = getTwitterClient();
    +
    +        try {
    +            lock.writeLock().lock();
    +            providerQueue = constructQueue();
    +        } finally {
    +            lock.writeLock().unlock();
    --- End diff --
    
    The naming of the classes is the issue, but those are outside of our control.  You can
synchronize all of the blocks on the same object for better readability in this class, as
there will only ever be one thread adding to the queue.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message