asaskevich / EventBus

[Go] Lightweight eventbus with async compatibility for Go
MIT License
1.74k stars 220 forks source link

Use defer for unlock #6

Closed dominikschulz closed 9 years ago

dominikschulz commented 9 years ago

This commit introduces the common idiom of using defer for releasing locks. This will make the code slightly more readable and less error prone.

asaskevich commented 9 years ago

This pull request also will be merged later, there are some merge errors. In any case, thanks, :+1:

asaskevich commented 9 years ago

I hope that's all commits merged rightly.