Raudius / Pushraven

A simple Java library to interface with Firebase Cloud Messaging (FCM) API. Pushraven allows you to push notifications to clients in very few lines of code.
MIT License
78 stars 34 forks source link

Singleton not thread safe #17

Open iamareebjamal opened 6 years ago

iamareebjamal commented 6 years ago

The singleton pattern is prone to synchronization errors and is not thread-safe. If multiple thread mutate the state of Push Raven, it will lead to an inconsistent state. The library is really great and I would like to contribute in it after some discussion over design patterns are done

I think we can achieve simpler syntax with production level design with minimal impact on current API

Raudius commented 6 years ago

I am open to any suggestions, in fact the singleton implementation came about after issue #2

iamareebjamal commented 6 years ago

Sure. I will add the proposed changes here soon