Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-dev] Notifying of notifications isn't thread safe, and should be doc'ed as such

Hi Eddie,

I guess I'm at least partly to blame for this, so I've filed a bug report for us: https://bugs.eclipse.org/bugs/show_bug.cgi?id=375360

Best regards,
Torkild

Den 26. mars 2012 kl. 20:26 skrev Eddie Galvez:

(or fix it in the framework…)
 
Just wanted to share my experience using Notifications.getService.notify(List<AbstractNotification>). We found that if you call that from multiple threads concurrently, there’s a loss of notification due to an exception that occurs (in a pretty silly way frankly) in PopupNotificationSink:
 
“notify” always calls “setSystem” on the Job. Eclipse throws an exception when that method is called while a Job is in any state other than NONE (so if the job is running…)
 
Now, you could avoid this exception by simply not calling setSystem each time – call it at Job construction time (the runSystem is a final boolean…)
 
Or, if you don’t want to promise thread-safety, doc it. But I think a notification thing like this should definitely, in its framework, be thread safe.
 
-          Eddie
_______________________________________________
mylyn-dev mailing list
mylyn-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-dev


Back to the top