Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Example of Singleton pattern

Tags:

singleton

Can anybody tell me a good example of Singleton pattern? Also I've one doubt to ask, Is the following scenario is that of singleton pattern:

When we have many printers connected in LAN but only one printer queue?

like image 650
Supereme Avatar asked Apr 06 '10 13:04

Supereme


1 Answers

Singleton is a software pattern.

Here is an example in C#.

Having a single queue on a LAN is more of a hardware/network design issue rather than a software concept, so not really applicable. If you were modeling such a thing in software and had to be certain there is only one queue, then it would be applicable.

like image 106
Oded Avatar answered Sep 23 '22 07:09

Oded



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!