WaitForMultipleObjects in C Extension

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

WaitForMultipleObjects in C Extension

İlyas Derse
 Hi guys I need your experiences. I made an Extension in C. When I stop the query on PostgreSQL,I want to control my extension's result with use cases in C.So I think , I should use WaitForMultipleObjects. Is there a like a SignalObjectHandle() ? By the way I'm using Windows.

Thanks...
Reply | Threaded
Open this post in threaded view
|

Re: WaitForMultipleObjects in C Extension

Merlin Moncure-2
On Tue, Jan 14, 2020 at 1:39 AM İlyas Derse <[hidden email]> wrote:
>
>  Hi guys I need your experiences. I made an Extension in C. When I stop the query on PostgreSQL,I want to control my extension's result with use cases in C.So I think , I should use WaitForMultipleObjects. Is there a like a SignalObjectHandle() ? By the way I'm using Windows.

Are you using threading in your extension?  This is something to avoid
except in very specific cases, particularly using native calls.

merlin


Reply | Threaded
Open this post in threaded view
|

Re: WaitForMultipleObjects in C Extension

George Neuner
In reply to this post by İlyas Derse
On Tue, 14 Jan 2020 10:35:09 +0300, ?lyas Derse <[hidden email]>
wrote:

> Hi guys I need your experiences. I made an Extension in C. When I stop the
>query on PostgreSQL,I want to control my extension's result with use cases
>in C.So I think , I should use WaitForMultipleObjects.

Not really understanding this.


>Is there a like a SignalObjectHandle() ? By the way I'm using Windows.

Not exactly.  Windows does has some signaling objects like Unix/Linux,
but they exist only in the filesystem and network stack, and they are
signaled only by events within those subsystems.  IOW, they can't be
signaled manually.

For general communication/synchronization purposes Windows uses an
event based notification system.  See:
https://docs.microsoft.com/en-us/windows/win32/sync/using-synchronization
https://docs.microsoft.com/en-us/windows/win32/sync/using-event-objects

George