-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shared singleton thread #16
base: master
Are you sure you want to change the base?
Conversation
static JFRThread *manager = nil; | ||
static dispatch_once_t onceToken; | ||
dispatch_once(&onceToken, ^{ | ||
manager = [[[self class] alloc] init]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a class method, self
is already a Class
, so this is redundant:
manager = [[[self class] alloc] init];
Better as:
manager = [[self alloc] init];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch.
Note: should not be merged if #25 is accepted |
Any update on whether this or #25 will be accepted? |
@jtreanor we ran into some snags with some reference problems using the queue based API in #25 (Since that seems to be the better way to go) and haven't gotten a chance since to look at it again. It is definitely something we would like to finish, as if it works well it would be a win for Starscream as well. |
Cool, thanks @acmacalister We are considering moving back to jetfire from SocketRocket (we switched after encountering #9 and #13). It looks like Jetfire has gotten even better since the 😄 |
@jtreanor cool. If you end up switching back, let us know if you run into anything. 😄 |
This for the enhancement for #15. Feedback appreciated.