On Wed, May 8, 2019 at 10:17 PM Nitish Saboo <nitish.sabo...@gmail.com> wrote:
> Yes, I want (exactly) two instances of syslog-ng engines running since I > initialised the engine twice.And I guess it is possible only when the > syslog-ng engines are running on two different processors.I might be wrong > here, please correct me if my understanding is not right. > My goal right now is how to verify if two independent syslog-ng engines > are getting initialised or not ? > Once this verification is done, Can we hook instance 'a' to syslog-ng > engine on processor 'a' and instance 'b' to syslog-ng engine on processor > 'b'. > There may be a human language barrier here in as much as my native language is English and I suspect your native language is something else. Whether or not you instantiate two distinct syslog-ng engines is unrelated to which CPUs (processors) each runs on. There is no way, in general, for the Go scheduler to know which CPU a goroutine is running on. Nor is there any way to bind a goroutine to a specific CPU as far as I know. You could (in theory) create two distinct instances of the syslog-ng engine and they could still execute on the same CPU. If or no other reason than that your system only has a single CPU core available for your process. > I hope I am able to clarify my thinking here. No, sorry, you have not. If anything every reply you make increases the confusion about what you are trying to do. If your `*initialize_engine()` method always instantiates, and returns, a new instance of the "syslog-ng" engine then the two Go objects initialized by that call will be two independent instances of that engine. Assuming, of course, that your syslog-ng engine does not share state between distinct `**initialize_engine()` calls.* -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD_s54b%3DUcprekRMWXGZvRv%3D51E6XsgM8u9yd3XQHtTZ%3DQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.