. I activate a server with no clients. The server invoke AcceptEx (on a seperate thread), and returns immediatelly with ERROR_IO_PENDING. On another thread (worker thread), there is a call to GetQueueStatusComplete from grpc_iocp_work. grcp_iocp_work is invoked periodically, and its also invoked after AcceptEx thread has completed.
Moshe. בתאריך יום שלישי, 25 ביולי 2017 בשעה 23:04:30 UTC+3, מאת Nicolas Noble: > > Which scenario have you identified that leads to a thread exiting ? > > On Tue, Jul 25, 2017 at 4:41 AM, Mos Yud <[email protected] <javascript:>> > wrote: > >> ,Hi >> >> .I am using GRPC 1.4.0 on windows >> >> :According the code, accepting new connection goes like this >> >> *:Thread1* >> *...* >> closure_exec_thread_func >> Listen >> AcceptEx with ovelapped >> >> the sockets are associated with g_iocp. >> >> >> *thread 2:* >> ... >> grpc_iocp_work >> GetQueuedCompletionStatus >> >> >> .thread 2 might be executed after thread 1 is terminated >> :according to msdn reference about acceptex >> >> *Note* All I/O initiated by a given thread is canceled when that >> thread exits. For overlapped sockets, pending asynchronous operations can >> fail if the thread is closed before the operations complete. See >> *ExitThread* >> <https://msdn.microsoft.com/en-us/library/windows/desktop/ms682659(v=vs.85).aspx> >> for >> more information. >> >> .When activating AcceptEx at thread 1, it creates pending asynchronous >> operations >> At thread 2 we query for information regarding this pendin io operation. >> >> ?Shouldnt there be a problem with this flow >> >> I do know that such a flow (Thread 1: assynchronous accept exit, Thread >> 2: GetQueuedCompletionStatus) might cause a problem in windows XP >> >> Thx, >> Moshe. >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "grpc.io" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/grpc-io. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/grpc-io/355d3217-9d13-43a0-807b-1d23f72ac46d%40googlegroups.com >> >> <https://groups.google.com/d/msgid/grpc-io/355d3217-9d13-43a0-807b-1d23f72ac46d%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/0f28fcae-4f06-4fc2-8816-c82cc541aafb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
