lehmannro / pyhkal2

IRC bot with bling bling
7 stars 2 forks source link

IRCClient as singleton? #32

Open freddyb opened 14 years ago

freddyb commented 14 years ago

if we implemented the IRCClient as a singleton, we might circumvent expose-issues

lehmannro commented 14 years ago

Even while intuitively possible (there should never be more than one IRCClient) we cannot make such assumptions due to the very nature of our transport layout. A connection can be reachable much longer than it's alive, for reasons out of our control. Such a move would kill off all the freedoms we bought with asynchronous processing. (If you need to reach an IRCClient you should emit signals and only truly active connections, of which there should be only one, must react upon such inquiries.) Count me -1 on that proposal.