Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #124149 > unrolled thread

How to inline the main function of a thread?

Started byWuns Haerst <Wuns.Haerst@wurstfabrik.at>
First post2026-06-30 10:27 +0200
Last post2026-07-17 15:23 +0300
Articles 20 on this page of 195 — 15 participants

Back to article view | Back to comp.lang.c++


Contents

  How to inline the main function of a thread? Wuns Haerst <Wuns.Haerst@wurstfabrik.at> - 2026-06-30 10:27 +0200
    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-30 01:42 -0700
      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-06-30 10:44 +0000
        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-01 12:23 -0700
          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-02 08:13 +0000
            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-02 11:41 -0700
              Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-03 08:59 +0000
                Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-07-03 14:41 +0000
                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-03 15:59 +0000
                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-05 13:22 -0700
                      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-06 09:29 +0000
                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-06 12:31 -0700
                          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-07 10:41 +0000
                            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-07 15:30 -0700
                              Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-08 09:38 +0000
                                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-08 14:13 -0700
                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-03 12:44 -0700
                  Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-03 12:45 -0700
                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-04 09:16 +0000
                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-04 17:32 -0700
                      Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-04 17:35 -0700
                      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-05 08:19 +0000
                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-05 01:21 -0700
                          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-05 15:48 +0000
                            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-05 13:01 -0700
                              Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-06 09:28 +0000
                                Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-06 21:42 +0300
                                  Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-06 12:45 -0700
                                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-06 12:53 -0700
                                      Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-07 15:07 -0700
                                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-07 10:40 +0000
                                    Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-07 20:36 +0300
                                      Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-07-07 18:09 +0000
                                        Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-07 21:40 +0300
                                          Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-07-07 22:11 +0000
                                      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-08 09:34 +0000
                                        Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-08 22:16 +0300
                                          Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-08 14:16 -0700
                                          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-09 08:55 +0000
                                            Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-07-09 15:18 +0000
                                              Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-09 15:43 +0000
                                                Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-07-10 15:32 +0000
                                                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-10 16:03 +0000
                                              Re: How to inline the main function of a thread? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-07-09 14:07 -0700
                                                Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-07-10 15:34 +0000
                                            Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-09 22:15 +0300
                                              Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-10 09:21 +0000
                                                Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-10 14:02 +0300
                                                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-10 11:22 +0000
                                                    Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-10 14:45 +0300
                                                      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-10 15:12 +0000
                                                        Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-10 18:43 +0300
                                                          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-10 16:06 +0000
                                                            Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-10 19:13 +0300
                                                              Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-11 09:28 +0000
                                                                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-11 14:41 -0700
                                                                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-12 15:23 +0000
                                                                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-13 13:12 -0700
                                                                      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-14 11:05 +0000
                                                                        Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-07-14 14:31 +0000
                                                                          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-14 15:42 +0000
                                                  Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-10 15:33 -0700
                                                  Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-10 15:33 -0700
                                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-08 14:15 -0700
                                          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-09 08:55 +0000
                                            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-09 12:51 -0700
                                              Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-10 09:22 +0000
                                                Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-10 14:22 +0300
                                                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-10 11:24 +0000
                                                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-10 12:32 -0700
                                                      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-11 09:29 +0000
                                                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-11 14:09 -0700
                                                          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-12 15:15 +0000
                                                            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-12 10:58 -0700
                                                              Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-13 09:39 +0000
                                                                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-13 13:14 -0700
                            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-05 13:16 -0700
                              Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-06 09:29 +0000
                                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-06 12:49 -0700
                                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-07 10:41 +0000
                                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-07 15:17 -0700
                                      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-08 09:38 +0000
                                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-08 14:17 -0700
                                          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-09 08:56 +0000
                                            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-09 12:53 -0700
                                              Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-10 09:24 +0000
                                                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-10 13:36 -0700
                                                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-11 09:30 +0000
                                                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-11 14:08 -0700
                                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-07 15:19 -0700
                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-04 23:36 -0700
                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-05 08:21 +0000
                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-05 01:22 -0700
                      Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-07-05 14:39 +0000
                        Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-05 15:50 +0000
                          Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-12 11:22 -0700
                      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-05 15:49 +0000
                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-10 00:16 -0700
                          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-10 09:25 +0000
                            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-10 15:36 -0700
                              Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-11 09:32 +0000
                                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-11 14:10 -0700
                                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-12 15:18 +0000
                                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-12 11:21 -0700
                                      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-13 10:26 +0000
                                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-13 13:05 -0700
                                          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-14 10:58 +0000
                                            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-14 13:45 -0700
                                              Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-15 11:23 +0000
                                                Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-07-15 14:07 +0000
                                                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-15 15:54 +0000
                                                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-15 15:51 -0700
                                                      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-16 10:44 +0000
                                                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-16 12:37 -0700
                                                          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-17 09:26 +0000
                                                          Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-17 13:32 +0300
                                                            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-17 12:00 -0700
                                                              Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-18 23:12 +0300
                                                                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-18 17:15 -0700
                                                                  Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-18 17:18 -0700
                                                                    Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-19 04:56 +0300
                                                                    Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-19 05:00 +0300
                                                                      Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-19 13:54 -0700
                                                                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-19 07:57 +0000
                                                                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-19 13:54 -0700
                                                                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-19 13:57 -0700
                                                                      Re: How to inline the main function of a thread? boltar@battlestar-galactica.com - 2026-07-20 07:51 +0000
                                                                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-20 13:15 -0700
                                                                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-18 17:37 -0700
                                                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-16 12:40 -0700
                                                          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-17 09:27 +0000
                                                            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-19 13:55 -0700
                                                              Re: How to inline the main function of a thread? boltar@battlestar-galactica.com - 2026-07-20 07:49 +0000
                                                                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-20 13:16 -0700
                                                                  Re: How to inline the main function of a thread? boltar@battlestar-galactica.com - 2026-07-21 15:55 +0000
                                                                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-21 13:47 -0700
                                                                      Re: How to inline the main function of a thread? boltar@battlestar-galactica.com - 2026-07-21 21:13 +0000
                                                                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-21 14:28 -0700
                                                                          Re: How to inline the main function of a thread? boltar@battlestar.co.uk - 2026-07-22 08:01 +0000
                                                                            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-22 13:28 -0700
                                                                              Re: How to inline the main function of a thread? boltar@battlestar.co.uk - 2026-07-23 15:01 +0000
                                                                        Re: How to inline the main function of a thread? cross@spitfire.i.gajendra.net (Dan Cross) - 2026-07-22 01:53 +0000
                                                                          Re: How to inline the main function of a thread? boltar@battlestar.co.uk - 2026-07-22 08:02 +0000
                                                                            Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-22 13:30 -0700
                                                                            Re: How to inline the main function of a thread? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-07-22 16:02 -0700
                                                                              Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-07-23 15:00 +0000
                                                                              Re: How to inline the main function of a thread? boltar@caprica.space - 2026-07-23 15:05 +0000
                                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-11 14:11 -0700
                                  Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-12 15:19 +0000
                                    Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-12 11:02 -0700
                                      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-13 09:42 +0000
                                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-16 13:50 -0700
                                    Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-12 23:05 +0300
                                      Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-13 13:08 -0700
                                        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-16 13:56 -0700
                                          Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-16 13:58 -0700
              Re: How to inline the main function of a thread? Ross Finlayson <ross.a.finlayson@gmail.com> - 2026-07-03 10:45 -0700
                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-03 12:36 -0700
            Re: How to inline the main function of a thread? Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-07-28 12:50 +0100
    Re: How to inline the main function of a thread? David Brown <david.brown@hesbynett.no> - 2026-06-30 11:07 +0200
      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-06-30 10:46 +0000
        Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-01 12:25 -0700
          Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-02 08:13 +0000
    Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-06-30 10:41 +0000
    Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-06-30 14:14 +0000
      Re: How to inline the main function of a thread? Bonita Montero <Bonita.Montero@gmail.com> - 2026-06-30 16:30 +0200
        Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-06-30 15:25 +0000
          Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-01 12:30 -0700
          Re: How to inline the main function of a thread? Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-05 14:03 +0200
            Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-07-05 14:41 +0000
              Re: How to inline the main function of a thread? Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-05 20:08 +0200
                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-05 13:05 -0700
                  Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-05 14:03 -0700
                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-05 14:36 -0700
                Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-07-06 17:47 +0000
                  Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-06 21:49 +0300
                    Re: How to inline the main function of a thread? Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-08 15:47 +0200
                      Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-08 14:32 -0700
                        Re: How to inline the main function of a thread? Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-09 10:34 +0200
                          Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-09 13:01 -0700
                            Re: How to inline the main function of a thread? Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-10 05:58 +0200
                              Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-12 11:19 -0700
                  Re: How to inline the main function of a thread? Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-17 13:56 +0200
        Re: How to inline the main function of a thread? Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-07-28 13:31 +0100
      Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-06-30 15:39 +0000
        Re: How to inline the main function of a thread? Wuns Haerst <Wuns.Haerst@wurstfabrik.at> - 2026-06-30 18:00 +0200
          Re: How to inline the main function of a thread? scott@slp53.sl.home (Scott Lurndal) - 2026-06-30 17:05 +0000
            Re: How to inline the main function of a thread? boltar@caprica.universe - 2026-07-01 08:22 +0000
              Re: How to inline the main function of a thread? Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-07-28 14:43 +0100
                Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-28 12:31 -0700
                Re: How to inline the main function of a thread? boltar@uxvz2mpj0o8fzg70vyzzcf46nvx2.biz - 2026-07-29 08:36 +0000
    Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-06-30 23:29 +0300
      Re: How to inline the main function of a thread? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-04 23:47 -0700
    Re: How to inline the main function of a thread? Wuns Haerst <Wuns.Haerst@wurstfabrik.at> - 2026-07-17 13:45 +0200
      Re: How to inline the main function of a thread? Michael S <already5chosen@yahoo.com> - 2026-07-17 15:23 +0300

Page 2 of 10 — ← Prev page 1 [2] 3 4 … 10  Next page →


#124181

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2026-07-04 17:35 -0700
Message-ID<112c8sf$mc0t$1@dont-email.me>
In reply to#124180
On 7/4/2026 5:32 PM, Chris M. Thomasson wrote:
> On 7/4/2026 2:16 AM, boltar@caprica.universe wrote:
>> On Fri, 3 Jul 2026 12:44:07 -0700
>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>>> On 7/3/2026 1:59 AM, boltar@caprica.universe wrote:
>>>> I'd hate to see your code, must be an overcomplicated mess.
>>>>
>>>
>>> Set your coffee down! Here is my raw test for my mind trying to 
>>> sketch out an IOCP server setup from my memory... It should compile 
>>> for you, I 
>>
>> Are you seriously expecting me to believe you spent a morning writing the
>> 1200 lines of code below from memory? Oh please.
> 
> Several days on some free time, yes, from memory.
> 
> 
>> Also it looks like win32 code and AFAIK windows for [reasons] can't do
>> multiplexing on sockets so you have the ridiculous situation of needing a
>> thread per connection whether you like it or not.
> 
> Huh? When is the last time you used GetQueuedCompletionStatusEx?
> 
> 
>>> will show my ralloc code in follow up. I had a little trouble 
>>
>> Don't bother, don't care, I have better things to do than wade through 
>> all
>> that code. Provide a 20 line example of "simple" thread pools and I might
>> be interested.
> 
> 
> My ralloc code? Its pretty old! Yet works like a charm.

Olivia Newton John - Magic (live on the midnight special)

https://youtu.be/J3_uO5Fa8Oo?list=RDJ3_uO5Fa8Oo

[toc] | [prev] | [next] | [standalone]


#124184

Fromboltar@caprica.universe
Date2026-07-05 08:19 +0000
Message-ID<112d41p$1cvsj$1@dont-email.me>
In reply to#124180
On Sat, 4 Jul 2026 17:32:07 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>On 7/4/2026 2:16 AM, boltar@caprica.universe wrote:
>> On Fri, 3 Jul 2026 12:44:07 -0700
>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>>> On 7/3/2026 1:59 AM, boltar@caprica.universe wrote:
>>>> I'd hate to see your code, must be an overcomplicated mess.
>>>>
>>>
>>> Set your coffee down! Here is my raw test for my mind trying to sketch 
>>> out an IOCP server setup from my memory... It should compile for you, I 
>> 
>> Are you seriously expecting me to believe you spent a morning writing the
>> 1200 lines of code below from memory? Oh please.
>
>Several days on some free time, yes, from memory.

What an exiting life you must have.

>> Also it looks like win32 code and AFAIK windows for [reasons] can't do
>> multiplexing on sockets so you have the ridiculous situation of needing a
>> thread per connection whether you like it or not.
>
>Huh? When is the last time you used GetQueuedCompletionStatusEx?

Never even heard of it. Can it also multiplex file descriptors + std in,out,err
in the same call like select() or poll()? No, didn't think so, so you'll still
need multiple threads if you want to do all at the same time. Good old half
assed win32.

>> Don't bother, don't care, I have better things to do than wade through all
>> that code. Provide a 20 line example of "simple" thread pools and I might
>> be interested.
>
>
>My ralloc code? Its pretty old! Yet works like a charm.

So show a short example in 20 lines or less then if its as "simple" as you
claim.

[toc] | [prev] | [next] | [standalone]


#124186

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2026-07-05 01:21 -0700
Message-ID<112d475$u15l$1@dont-email.me>
In reply to#124184
On 7/5/2026 1:19 AM, boltar@caprica.universe wrote:
> On Sat, 4 Jul 2026 17:32:07 -0700
> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>> On 7/4/2026 2:16 AM, boltar@caprica.universe wrote:
>>> On Fri, 3 Jul 2026 12:44:07 -0700
>>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>>>> On 7/3/2026 1:59 AM, boltar@caprica.universe wrote:
>>>>> I'd hate to see your code, must be an overcomplicated mess.
>>>>>
>>>>
>>>> Set your coffee down! Here is my raw test for my mind trying to 
>>>> sketch out an IOCP server setup from my memory... It should compile 
>>>> for you, I 
>>>
>>> Are you seriously expecting me to believe you spent a morning writing 
>>> the
>>> 1200 lines of code below from memory? Oh please.
>>
>> Several days on some free time, yes, from memory.
> 
> What an exiting life you must have.
> 
>>> Also it looks like win32 code and AFAIK windows for [reasons] can't do
>>> multiplexing on sockets so you have the ridiculous situation of 
>>> needing a
>>> thread per connection whether you like it or not.
>>
>> Huh? When is the last time you used GetQueuedCompletionStatusEx?
> 
> Never even heard of it. Can it also multiplex file descriptors + std 
> in,out,err
> in the same call like select() or poll()? No, didn't think so, so you'll 
> still
> need multiple threads if you want to do all at the same time. Good old half
> assed win32.

Huh? It can work with SOCKETS and FILES.

> 
>>> Don't bother, don't care, I have better things to do than wade 
>>> through all
>>> that code. Provide a 20 line example of "simple" thread pools and I 
>>> might
>>> be interested.
>>
>>
>> My ralloc code? Its pretty old! Yet works like a charm.
> 
> So show a short example in 20 lines or less then if its as "simple" as you
> claim.
> 

Huh? My ralloc code or a thread pool?

[toc] | [prev] | [next] | [standalone]


#124191

Fromboltar@caprica.universe
Date2026-07-05 15:48 +0000
Message-ID<112dubv$16l44$1@dont-email.me>
In reply to#124186
On Sun, 5 Jul 2026 01:21:56 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>On 7/5/2026 1:19 AM, boltar@caprica.universe wrote:
>> On Sat, 4 Jul 2026 17:32:07 -0700
>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>>> On 7/4/2026 2:16 AM, boltar@caprica.universe wrote:
>>>> On Fri, 3 Jul 2026 12:44:07 -0700
>>>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>>>>> On 7/3/2026 1:59 AM, boltar@caprica.universe wrote:
>>>>>> I'd hate to see your code, must be an overcomplicated mess.
>>>>>>
>>>>>
>>>>> Set your coffee down! Here is my raw test for my mind trying to 
>>>>> sketch out an IOCP server setup from my memory... It should compile 
>>>>> for you, I 
>>>>
>>>> Are you seriously expecting me to believe you spent a morning writing 
>>>> the
>>>> 1200 lines of code below from memory? Oh please.
>>>
>>> Several days on some free time, yes, from memory.
>> 
>> What an exiting life you must have.
>> 
>>>> Also it looks like win32 code and AFAIK windows for [reasons] can't do
>>>> multiplexing on sockets so you have the ridiculous situation of 
>>>> needing a
>>>> thread per connection whether you like it or not.
>>>
>>> Huh? When is the last time you used GetQueuedCompletionStatusEx?
>> 
>> Never even heard of it. Can it also multiplex file descriptors + std 
>> in,out,err
>> in the same call like select() or poll()? No, didn't think so, so you'll 
>> still
>> need multiple threads if you want to do all at the same time. Good old half
>> assed win32.
>
>Huh? It can work with SOCKETS and FILES.

Well thats nice. What about pipes, fifos and character and block devices?
Of course if they'd use the interface that was standard even when they were 
developing win32 it would have been more useful.

>> So show a short example in 20 lines or less then if its as "simple" as you
>> claim.
>> 
>
>Huh? My ralloc code or a thread pool?

A thread pool, I have no idea what your ralloc code is supposed to do and I
couldn't care less about it. You were claiming thread pools are easy to 
implement so lets see a nice easy example.

[toc] | [prev] | [next] | [standalone]


#124195

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2026-07-05 13:01 -0700
Message-ID<112ed66$1cki5$1@dont-email.me>
In reply to#124191
On 7/5/2026 8:48 AM, boltar@caprica.universe wrote:
> On Sun, 5 Jul 2026 01:21:56 -0700
> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>> On 7/5/2026 1:19 AM, boltar@caprica.universe wrote:
>>> On Sat, 4 Jul 2026 17:32:07 -0700
>>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>>>> On 7/4/2026 2:16 AM, boltar@caprica.universe wrote:
>>>>> On Fri, 3 Jul 2026 12:44:07 -0700
>>>>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>>>>>> On 7/3/2026 1:59 AM, boltar@caprica.universe wrote:
>>>>>>> I'd hate to see your code, must be an overcomplicated mess.
>>>>>>>
>>>>>>
>>>>>> Set your coffee down! Here is my raw test for my mind trying to 
>>>>>> sketch out an IOCP server setup from my memory... It should 
>>>>>> compile for you, I 
>>>>>
>>>>> Are you seriously expecting me to believe you spent a morning 
>>>>> writing the
>>>>> 1200 lines of code below from memory? Oh please.
>>>>
>>>> Several days on some free time, yes, from memory.
>>>
>>> What an exiting life you must have.
>>>
>>>>> Also it looks like win32 code and AFAIK windows for [reasons] can't do
>>>>> multiplexing on sockets so you have the ridiculous situation of 
>>>>> needing a
>>>>> thread per connection whether you like it or not.
>>>>
>>>> Huh? When is the last time you used GetQueuedCompletionStatusEx?
>>>
>>> Never even heard of it. Can it also multiplex file descriptors + std 
>>> in,out,err
>>> in the same call like select() or poll()? No, didn't think so, so 
>>> you'll still
>>> need multiple threads if you want to do all at the same time. Good 
>>> old half
>>> assed win32.
>>
>> Huh? It can work with SOCKETS and FILES.
> 
> Well thats nice. What about pipes, fifos and character and block devices?
> Of course if they'd use the interface that was standard even when they 
> were developing win32 it would have been more useful.
> 
>>> So show a short example in 20 lines or less then if its as "simple" 
>>> as you
>>> claim.
>>>
>>
>> Huh? My ralloc code or a thread pool?
> 
> A thread pool, I have no idea what your ralloc code is supposed to do and I
> couldn't care less about it. You were claiming thread pools are easy to 
> implement so lets see a nice easy example.
> 

A thread pool in 20 lines? You mean to init the sucker and use it as the 
user right? Not the guts, its going to take more than that. The logic is 
straightforward to me. Yeah, its not that hard because I have made so 
many of them in the past.

I need to make one for my from memory wrt the iocp test anyway. Heck my 
io_worker in its current state is:
________________
struct io_worker
{
     io_system& m_system;

     io_worker(
         io_system& system

     ) : m_system(system)
     {

     }


     int
         io_worker_loop()
     {
         return 0;
     }
};
________________


It needs a intrusive link to allow it to be inserted into an intrusive 
linked list.

So perhaps:

struct io_worker
{
     io_worker* m_next; // hello!
     io_system& m_system;

     io_worker(
         io_system& system

     ) : m_system(system)
     {

     }


     int
         io_worker_loop()
     {
         return 0;
     }
};



Oh my another line.

[toc] | [prev] | [next] | [standalone]


#124202

Fromboltar@caprica.universe
Date2026-07-06 09:28 +0000
Message-ID<112fsft$1qq2h$1@dont-email.me>
In reply to#124195
On Sun, 5 Jul 2026 13:01:07 -0700
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>On 7/5/2026 8:48 AM, boltar@caprica.universe wrote:
>> A thread pool, I have no idea what your ralloc code is supposed to do and I
>> couldn't care less about it. You were claiming thread pools are easy to 
>> implement so lets see a nice easy example.
>> 
>
>A thread pool in 20 lines? You mean to init the sucker and use it as the 
>user right? Not the guts, its going to take more than that. The logic is 
>straightforward to me. Yeah, its not that hard because I have made so 
>many of them in the past.

Oh right, so not quite as simple as:

thread mythread(....)
mythread.detach()

then as you were claiming. Glad we finally cleared that up.

[toc] | [prev] | [next] | [standalone]


#124206

FromMichael S <already5chosen@yahoo.com>
Date2026-07-06 21:42 +0300
Message-ID<20260706214217.000033d0@yahoo.com>
In reply to#124202
On Mon, 6 Jul 2026 09:28:29 -0000 (UTC)
boltar@caprica.universe wrote:

> On Sun, 5 Jul 2026 13:01:07 -0700
> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
> >On 7/5/2026 8:48 AM, boltar@caprica.universe wrote:  
> >> A thread pool, I have no idea what your ralloc code is supposed to
> >> do and I couldn't care less about it. You were claiming thread
> >> pools are easy to implement so lets see a nice easy example.
> >>   
> >
> >A thread pool in 20 lines? You mean to init the sucker and use it as
> >the user right? Not the guts, its going to take more than that. The
> >logic is straightforward to me. Yeah, its not that hard because I
> >have made so many of them in the past.  
> 
> Oh right, so not quite as simple as:
> 
> thread mythread(....)
> mythread.detach()
> 
> then as you were claiming. Glad we finally cleared that up.
> 
>

On Windows? Yes, exactly as simple as yours:
  QueueUserWorkItem(mythreadProc, myThreadContext, WT_EXECUTEDEFAULT);

That is, it is simple for as long as you don't want to join. Otherwise,
it become more involved. But situations in which join is not necessary
are common.

[toc] | [prev] | [next] | [standalone]


#124209

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2026-07-06 12:45 -0700
Message-ID<112h0l6$2ao2g$1@dont-email.me>
In reply to#124206
On 7/6/2026 11:42 AM, Michael S wrote:
> On Mon, 6 Jul 2026 09:28:29 -0000 (UTC)
> boltar@caprica.universe wrote:
> 
>> On Sun, 5 Jul 2026 13:01:07 -0700
>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>>> On 7/5/2026 8:48 AM, boltar@caprica.universe wrote:
>>>> A thread pool, I have no idea what your ralloc code is supposed to
>>>> do and I couldn't care less about it. You were claiming thread
>>>> pools are easy to implement so lets see a nice easy example.
>>>>    
>>>
>>> A thread pool in 20 lines? You mean to init the sucker and use it as
>>> the user right? Not the guts, its going to take more than that. The
>>> logic is straightforward to me. Yeah, its not that hard because I
>>> have made so many of them in the past.
>>
>> Oh right, so not quite as simple as:
>>
>> thread mythread(....)
>> mythread.detach()
>>
>> then as you were claiming. Glad we finally cleared that up.
>>
>>
> 
> On Windows? Yes, exactly as simple as yours:
>    QueueUserWorkItem(mythreadProc, myThreadContext, WT_EXECUTEDEFAULT);
> 
> That is, it is simple for as long as you don't want to join. Otherwise,
> it become more involved. But situations in which join is not necessary
> are common.
> 

Using join for a thread pool can be worked out with proper logic. 
Detached threads, well, imvvvho, are bad mojo anyway, they have their 
place, but I tend to always try to avoid them. Adding threads and 
removing them can use join and a read write mutex for the io_workers in 
the pool. Adding threads and removing them should be very infrequent 
anyway! :^) Usually, we setup a thread pool for say the io_workers that 
are one to one with processing units. We can also oversubscribe with 
creating two threads per. Once that pool is setup, it remains rather 
static.

Beware of detached threads unless you know what you are doing!

[toc] | [prev] | [next] | [standalone]


#124211

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2026-07-06 12:53 -0700
Message-ID<112h142$2b0ct$1@dont-email.me>
In reply to#124209
On 7/6/2026 12:45 PM, Chris M. Thomasson wrote:
> On 7/6/2026 11:42 AM, Michael S wrote:
>> On Mon, 6 Jul 2026 09:28:29 -0000 (UTC)
>> boltar@caprica.universe wrote:
>>
>>> On Sun, 5 Jul 2026 13:01:07 -0700
>>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>>>> On 7/5/2026 8:48 AM, boltar@caprica.universe wrote:
>>>>> A thread pool, I have no idea what your ralloc code is supposed to
>>>>> do and I couldn't care less about it. You were claiming thread
>>>>> pools are easy to implement so lets see a nice easy example.
>>>>
>>>> A thread pool in 20 lines? You mean to init the sucker and use it as
>>>> the user right? Not the guts, its going to take more than that. The
>>>> logic is straightforward to me. Yeah, its not that hard because I
>>>> have made so many of them in the past.
>>>
>>> Oh right, so not quite as simple as:
>>>
>>> thread mythread(....)
>>> mythread.detach()
>>>
>>> then as you were claiming. Glad we finally cleared that up.
>>>
>>>
>>
>> On Windows? Yes, exactly as simple as yours:
>>    QueueUserWorkItem(mythreadProc, myThreadContext, WT_EXECUTEDEFAULT);
>>
>> That is, it is simple for as long as you don't want to join. Otherwise,
>> it become more involved. But situations in which join is not necessary
>> are common.
>>
> 
> Using join for a thread pool can be worked out with proper logic. 
> Detached threads, well, imvvvho, are bad mojo anyway, they have their 
> place, but I tend to always try to avoid them. Adding threads and 
> removing them can use join and a read write mutex for the io_workers in 
> the pool. Adding threads and removing them should be very infrequent 
> anyway! :^) Usually, we setup a thread pool for say the io_workers that 
> are one to one with processing units. We can also oversubscribe with 
> creating two threads per. Once that pool is setup, it remains rather 
> static.
> 
> Beware of detached threads unless you know what you are doing!
> 
> 

Iirc in the past, QueueUserWorkItem etc, was not all that performant wrt 
custom ones. I think windows has a newer one:

https://learn.microsoft.com/en-us/windows/win32/api/threadpoolapiset/nf-threadpoolapiset-createthreadpool

https://learn.microsoft.com/en-us/windows/win32/procthread/using-the-thread-pool-functions

But, I have no problem with making one for myself that only has what it 
needs.

[toc] | [prev] | [next] | [standalone]


#124220

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2026-07-07 15:07 -0700
Message-ID<112jtbh$3629d$1@dont-email.me>
In reply to#124211
On 7/6/2026 12:53 PM, Chris M. Thomasson wrote:
> On 7/6/2026 12:45 PM, Chris M. Thomasson wrote:
>> On 7/6/2026 11:42 AM, Michael S wrote:
>>> On Mon, 6 Jul 2026 09:28:29 -0000 (UTC)
>>> boltar@caprica.universe wrote:
>>>
>>>> On Sun, 5 Jul 2026 13:01:07 -0700
>>>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>>>>> On 7/5/2026 8:48 AM, boltar@caprica.universe wrote:
>>>>>> A thread pool, I have no idea what your ralloc code is supposed to
>>>>>> do and I couldn't care less about it. You were claiming thread
>>>>>> pools are easy to implement so lets see a nice easy example.
>>>>>
>>>>> A thread pool in 20 lines? You mean to init the sucker and use it as
>>>>> the user right? Not the guts, its going to take more than that. The
>>>>> logic is straightforward to me. Yeah, its not that hard because I
>>>>> have made so many of them in the past.
>>>>
>>>> Oh right, so not quite as simple as:
>>>>
>>>> thread mythread(....)
>>>> mythread.detach()
>>>>
>>>> then as you were claiming. Glad we finally cleared that up.
>>>>
>>>>
>>>
>>> On Windows? Yes, exactly as simple as yours:
>>>    QueueUserWorkItem(mythreadProc, myThreadContext, WT_EXECUTEDEFAULT);
>>>
>>> That is, it is simple for as long as you don't want to join. Otherwise,
>>> it become more involved. But situations in which join is not necessary
>>> are common.
>>>
>>
>> Using join for a thread pool can be worked out with proper logic. 
>> Detached threads, well, imvvvho, are bad mojo anyway, they have their 
>> place, but I tend to always try to avoid them. Adding threads and 
>> removing them can use join and a read write mutex for the io_workers 
>> in the pool. Adding threads and removing them should be very 
>> infrequent anyway! :^) Usually, we setup a thread pool for say the 
>> io_workers that are one to one with processing units. We can also 
>> oversubscribe with creating two threads per. Once that pool is setup, 
>> it remains rather static.
>>
>> Beware of detached threads unless you know what you are doing!
>>
>>
> 
> Iirc in the past, QueueUserWorkItem etc, was not all that performant wrt 
> custom ones. I think windows has a newer one:
> 
> https://learn.microsoft.com/en-us/windows/win32/api/threadpoolapiset/nf- 
> threadpoolapiset-createthreadpool
> 
> https://learn.microsoft.com/en-us/windows/win32/procthread/using-the- 
> thread-pool-functions
> 
> But, I have no problem with making one for myself that only has what it 
> needs.
> 

I need to take a look. I don't know if they work with IOCP in the way I 
need. Anyway, I remember a special logic I used for my io_worker threads 
that might be incompatible with the "new" windows thread pool. It worked 
with per_thread cohorts and was able to fill them up using per_io 
completions. If a cohort got too full, it would be processed. Or if a 
gqcsex failed to return any per_io's with a zero timeout, they would be 
processed. akin to:

for (;;)
{
      if (! gqcsex(..., 0)) // 0 timeout
      {
          process_cohort();

          gqcxex(..., INFINITE); // wait
      }

      push_to_cohort(...);

      if (cohort.size() > cohort_threshold)
      {
          process_cohort();
      }
}

Each cohort was only able to be seen by its io_worker.


push_to_cohort would just link the completed per_io's to their correct 
list using its bitmask flags, example:

struct cohort
{
    cohort* m_next;
    size_t m_size;

    per_io* m_recv;
    per_io* m_send;
    per_io* m_accept;
    per_io* m_connect;
    per_io* m_file_read;
    per_io* m_file_write;

    // etc...
};


So, when a cohort gets processed it just walks itself. The good part is 
that it has damn good cache locality. Processing all of the recvs in a 
batch is good.

[toc] | [prev] | [next] | [standalone]


#124213

Fromboltar@caprica.universe
Date2026-07-07 10:40 +0000
Message-ID<112il2s$2pmav$1@dont-email.me>
In reply to#124206
On Mon, 6 Jul 2026 21:42:17 +0300
Michael S <already5chosen@yahoo.com> gabbled:
>On Mon, 6 Jul 2026 09:28:29 -0000 (UTC)
>boltar@caprica.universe wrote:
>
>> On Sun, 5 Jul 2026 13:01:07 -0700
>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
>> >On 7/5/2026 8:48 AM, boltar@caprica.universe wrote:  
>> >> A thread pool, I have no idea what your ralloc code is supposed to
>> >> do and I couldn't care less about it. You were claiming thread
>> >> pools are easy to implement so lets see a nice easy example.
>> >>   
>> >
>> >A thread pool in 20 lines? You mean to init the sucker and use it as
>> >the user right? Not the guts, its going to take more than that. The
>> >logic is straightforward to me. Yeah, its not that hard because I
>> >have made so many of them in the past.  
>> 
>> Oh right, so not quite as simple as:
>> 
>> thread mythread(....)
>> mythread.detach()
>> 
>> then as you were claiming. Glad we finally cleared that up.
>> 
>>
>
>On Windows? Yes, exactly as simple as yours:
>  QueueUserWorkItem(mythreadProc, myThreadContext, WT_EXECUTEDEFAULT);
>
>That is, it is simple for as long as you don't want to join. Otherwise,
>it become more involved. But situations in which join is not necessary
>are common.

Looks like windows maintains its own thread pool for a user which seems
wasteful but understandable in an OS that seems to require threads for 
everything. *nix however does not. So, i'll ask again for some example thread 
pool code.

[toc] | [prev] | [next] | [standalone]


#124216

FromMichael S <already5chosen@yahoo.com>
Date2026-07-07 20:36 +0300
Message-ID<20260707203611.000014ff@yahoo.com>
In reply to#124213
On Tue, 7 Jul 2026 10:40:28 -0000 (UTC)
boltar@caprica.universe wrote:

> On Mon, 6 Jul 2026 21:42:17 +0300
> Michael S <already5chosen@yahoo.com> gabbled:
> >On Mon, 6 Jul 2026 09:28:29 -0000 (UTC)
> >boltar@caprica.universe wrote:
> >  
> >> On Sun, 5 Jul 2026 13:01:07 -0700
> >> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:  
> >> >On 7/5/2026 8:48 AM, boltar@caprica.universe wrote:    
> >> >> A thread pool, I have no idea what your ralloc code is supposed
> >> >> to do and I couldn't care less about it. You were claiming
> >> >> thread pools are easy to implement so lets see a nice easy
> >> >> example. 
> >> >
> >> >A thread pool in 20 lines? You mean to init the sucker and use it
> >> >as the user right? Not the guts, its going to take more than
> >> >that. The logic is straightforward to me. Yeah, its not that hard
> >> >because I have made so many of them in the past.    
> >> 
> >> Oh right, so not quite as simple as:
> >> 
> >> thread mythread(....)
> >> mythread.detach()
> >> 
> >> then as you were claiming. Glad we finally cleared that up.
> >> 
> >>  
> >
> >On Windows? Yes, exactly as simple as yours:
> >  QueueUserWorkItem(mythreadProc, myThreadContext,
> > WT_EXECUTEDEFAULT);
> >
> >That is, it is simple for as long as you don't want to join.
> >Otherwise, it become more involved. But situations in which join is
> >not necessary are common.  
> 
> Looks like windows maintains its own thread pool for a user which
> seems wasteful 

Why wasteful?
If you don't use it, it costs you nothing.

> but understandable in an OS that seems to require
> threads for everything. *nix however does not.

I don't understand what you mean.
IMHO, portable *nix is the one that needs threads (or fork) for
everything.
On Windows, at least in theory, only I/O management (i.e. file open,
rename, delete etc...) has to be synchronous. For I/O data operations
(read, write, ioctl) programmer  has a choice of whether to do it
synchronously or asynchronously. The only exception I am aware of are
anonymous pipes.

Of course, nowadays file I/O is heavily cached, so even operations
done through asynchronous APIs behave as synchronous most of the time.
But that applies to all OSes.

> So, i'll ask again for
> some example thread pool code.
> 

[toc] | [prev] | [next] | [standalone]


#124217

Fromscott@slp53.sl.home (Scott Lurndal)
Date2026-07-07 18:09 +0000
Message-ID<vhb3S.436931$lkZe.404048@fx14.iad>
In reply to#124216
Michael S <already5chosen@yahoo.com> writes:
>On Tue, 7 Jul 2026 10:40:28 -0000 (UTC)
>boltar@caprica.universe wrote:
>
>> On Mon, 6 Jul 2026 21:42:17 +0300
>> Michael S <already5chosen@yahoo.com> gabbled:
>> >On Mon, 6 Jul 2026 09:28:29 -0000 (UTC)
>> >boltar@caprica.universe wrote:
>> >  
>> >> On Sun, 5 Jul 2026 13:01:07 -0700
>> >> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:  
>> >> >On 7/5/2026 8:48 AM, boltar@caprica.universe wrote:    
>> >> >> A thread pool, I have no idea what your ralloc code is supposed
>> >> >> to do and I couldn't care less about it. You were claiming
>> >> >> thread pools are easy to implement so lets see a nice easy
>> >> >> example. 
>> >> >
>> >> >A thread pool in 20 lines? You mean to init the sucker and use it
>> >> >as the user right? Not the guts, its going to take more than
>> >> >that. The logic is straightforward to me. Yeah, its not that hard
>> >> >because I have made so many of them in the past.    
>> >> 
>> >> Oh right, so not quite as simple as:
>> >> 
>> >> thread mythread(....)
>> >> mythread.detach()
>> >> 
>> >> then as you were claiming. Glad we finally cleared that up.
>> >> 
>> >>  
>> >
>> >On Windows? Yes, exactly as simple as yours:
>> >  QueueUserWorkItem(mythreadProc, myThreadContext,
>> > WT_EXECUTEDEFAULT);
>> >
>> >That is, it is simple for as long as you don't want to join.
>> >Otherwise, it become more involved. But situations in which join is
>> >not necessary are common.  
>> 
>> Looks like windows maintains its own thread pool for a user which
>> seems wasteful 
>
>Why wasteful?
>If you don't use it, it costs you nothing.
>
>> but understandable in an OS that seems to require
>> threads for everything. *nix however does not.
>
>I don't understand what you mean.
>IMHO, portable *nix is the one that needs threads (or fork) for
>everything.
>On Windows, at least in theory, only I/O management (i.e. file open,
>rename, delete etc...) has to be synchronous. For I/O data operations
>(read, write, ioctl) programmer  has a choice of whether to do it
>synchronously or asynchronously. The only exception I am aware of are
>anonymous pipes.
>
>Of course, nowadays file I/O is heavily cached, so even operations
>done through asynchronous APIs behave as synchronous most of the time.
>But that applies to all OSes.

Does windows have the equivalent of unix raw devices or linux O_DIRECT,
both of which avoid the buffer or file caches in the OS (and the user level
stdio caching)?

[toc] | [prev] | [next] | [standalone]


#124219

FromMichael S <already5chosen@yahoo.com>
Date2026-07-07 21:40 +0300
Message-ID<20260707214032.00001510@yahoo.com>
In reply to#124217
On Tue, 07 Jul 2026 18:09:31 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:

> Michael S <already5chosen@yahoo.com> writes:
> >On Tue, 7 Jul 2026 10:40:28 -0000 (UTC)
> >boltar@caprica.universe wrote:
> >  
> >> On Mon, 6 Jul 2026 21:42:17 +0300
> >> Michael S <already5chosen@yahoo.com> gabbled:  
> >> >On Mon, 6 Jul 2026 09:28:29 -0000 (UTC)
> >> >boltar@caprica.universe wrote:
> >> >    
> >> >> On Sun, 5 Jul 2026 13:01:07 -0700
> >> >> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled:
> >> >>  
> >> >> >On 7/5/2026 8:48 AM, boltar@caprica.universe wrote:      
> >> >> >> A thread pool, I have no idea what your ralloc code is
> >> >> >> supposed to do and I couldn't care less about it. You were
> >> >> >> claiming thread pools are easy to implement so lets see a
> >> >> >> nice easy example.   
> >> >> >
> >> >> >A thread pool in 20 lines? You mean to init the sucker and use
> >> >> >it as the user right? Not the guts, its going to take more than
> >> >> >that. The logic is straightforward to me. Yeah, its not that
> >> >> >hard because I have made so many of them in the past.      
> >> >> 
> >> >> Oh right, so not quite as simple as:
> >> >> 
> >> >> thread mythread(....)
> >> >> mythread.detach()
> >> >> 
> >> >> then as you were claiming. Glad we finally cleared that up.
> >> >> 
> >> >>    
> >> >
> >> >On Windows? Yes, exactly as simple as yours:
> >> >  QueueUserWorkItem(mythreadProc, myThreadContext,
> >> > WT_EXECUTEDEFAULT);
> >> >
> >> >That is, it is simple for as long as you don't want to join.
> >> >Otherwise, it become more involved. But situations in which join
> >> >is not necessary are common.    
> >> 
> >> Looks like windows maintains its own thread pool for a user which
> >> seems wasteful   
> >
> >Why wasteful?
> >If you don't use it, it costs you nothing.
> >  
> >> but understandable in an OS that seems to require
> >> threads for everything. *nix however does not.  
> >
> >I don't understand what you mean.
> >IMHO, portable *nix is the one that needs threads (or fork) for
> >everything.
> >On Windows, at least in theory, only I/O management (i.e. file open,
> >rename, delete etc...) has to be synchronous. For I/O data operations
> >(read, write, ioctl) programmer  has a choice of whether to do it
> >synchronously or asynchronously. The only exception I am aware of are
> >anonymous pipes.
> >
> >Of course, nowadays file I/O is heavily cached, so even operations
> >done through asynchronous APIs behave as synchronous most of the
> >time. But that applies to all OSes.  
> 
> Does windows have the equivalent of unix raw devices or linux
> O_DIRECT, both of which avoid the buffer or file caches in the OS
> (and the user level stdio caching)?
> 

I was never interested in raw devices, so don't know.
Surely, even if support is here it would require admin privilege.

As to O_DIRECT, one can open file with FILE_FLAG_NO_BUFFERING flag.
But when you do it then there are serious restriction on what allowed
and what not.
https://learn.microsoft.com/en-us/windows/win32/fileio/file-buffering
Again, I never was interested.







[toc] | [prev] | [next] | [standalone]


#124221

Fromscott@slp53.sl.home (Scott Lurndal)
Date2026-07-07 22:11 +0000
Message-ID<EQe3S.47321$i651.2999@fx45.iad>
In reply to#124219
Michael S <already5chosen@yahoo.com> writes:
>On Tue, 07 Jul 2026 18:09:31 GMT
>scott@slp53.sl.home (Scott Lurndal) wrote:
>

>> Does windows have the equivalent of unix raw devices or linux
>> O_DIRECT, both of which avoid the buffer or file caches in the OS
>> (and the user level stdio caching)?
>> 
>
>I was never interested in raw devices, so don't know.
>Surely, even if support is here it would require admin privilege.
>
>As to O_DIRECT, one can open file with FILE_FLAG_NO_BUFFERING flag.
>But when you do it then there are serious restriction on what allowed
>and what not.

Makes sense - direct I/O accesses need to be sector-aligned, same
as unix raw devices.

Useful for filesystem maintenance utilities and high-end databases.

[toc] | [prev] | [next] | [standalone]


#124226

Fromboltar@caprica.universe
Date2026-07-08 09:34 +0000
Message-ID<112l5jg$1krau$1@dont-email.me>
In reply to#124216
On Tue, 7 Jul 2026 20:36:11 +0300
Michael S <already5chosen@yahoo.com> gabbled:
>On Tue, 7 Jul 2026 10:40:28 -0000 (UTC)
>boltar@caprica.universe wrote:
>> Looks like windows maintains its own thread pool for a user which
>> seems wasteful 
>
>Why wasteful?
>If you don't use it, it costs you nothing.

It costs the kernel time and resources or do you think its all done by 
magic pixies?

>> but understandable in an OS that seems to require
>> threads for everything. *nix however does not.
>
>I don't understand what you mean.
>IMHO, portable *nix is the one that needs threads (or fork) for
>everything.

Wtf are you talking about? Its quite possible - and I've done it a number of
times - to write a network server in unix with a single thread & single process
using multiplexed sockets via select() or poll(). Thats how 1990s MUD & chat 
servers were written and IRC, Unaxcess along with plenty of other in house 
company servers.

[toc] | [prev] | [next] | [standalone]


#124231

FromMichael S <already5chosen@yahoo.com>
Date2026-07-08 22:16 +0300
Message-ID<20260708221655.000068ea@yahoo.com>
In reply to#124226
On Wed, 8 Jul 2026 09:34:40 -0000 (UTC)
boltar@caprica.universe wrote:

> On Tue, 7 Jul 2026 20:36:11 +0300
> Michael S <already5chosen@yahoo.com> gabbled:
> >On Tue, 7 Jul 2026 10:40:28 -0000 (UTC)
> >boltar@caprica.universe wrote:  
> >> Looks like windows maintains its own thread pool for a user which
> >> seems wasteful   
> >
> >Why wasteful?
> >If you don't use it, it costs you nothing.  
> 
> It costs the kernel time and resources or do you think its all done
> by magic pixies?
> 

It costs only if you use it.
Otherwise, accordiing to my understanding, the only cost is few
zero-initialized fields in process control block.

> >> but understandable in an OS that seems to require
> >> threads for everything. *nix however does not.  
> >
> >I don't understand what you mean.
> >IMHO, portable *nix is the one that needs threads (or fork) for
> >everything.  
> 
> Wtf are you talking about? 

I am talking about file IO. Was not it obvious?

> Its quite possible - and I've done it a
> number of times - to write a network server in unix with a single
> thread & single process using multiplexed sockets via select() or
> poll().

Then either files access in your server was blocking or you used
non-portable extensions to POSIX.
And it's not like on Windows it would be different. Except, may be, if
you want to support very old versions of Windows (>20 y.o.) in
whichcasee you'll only have select() and no poll(). Which is
inconvinience, but relatively minor one.

> Thats how 1990s MUD & chat servers were written and IRC,
> Unaxcess along with plenty of other in house company servers.
>


[toc] | [prev] | [next] | [standalone]


#124235

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2026-07-08 14:16 -0700
Message-ID<112menh$3u940$4@dont-email.me>
In reply to#124231
On 7/8/2026 12:16 PM, Michael S wrote:
> On Wed, 8 Jul 2026 09:34:40 -0000 (UTC)
> boltar@caprica.universe wrote:
> 
>> On Tue, 7 Jul 2026 20:36:11 +0300
>> Michael S <already5chosen@yahoo.com> gabbled:
>>> On Tue, 7 Jul 2026 10:40:28 -0000 (UTC)
>>> boltar@caprica.universe wrote:
>>>> Looks like windows maintains its own thread pool for a user which
>>>> seems wasteful
>>>
>>> Why wasteful?
>>> If you don't use it, it costs you nothing.
>>
>> It costs the kernel time and resources or do you think its all done
>> by magic pixies?
>>
> 
> It costs only if you use it.
> Otherwise, accordiing to my understanding, the only cost is few
> zero-initialized fields in process control block.
> 
>>>> but understandable in an OS that seems to require
>>>> threads for everything. *nix however does not.
>>>
>>> I don't understand what you mean.
>>> IMHO, portable *nix is the one that needs threads (or fork) for
>>> everything.
>>
>> Wtf are you talking about?
> 
> I am talking about file IO. Was not it obvious?
> 
>> Its quite possible - and I've done it a
>> number of times - to write a network server in unix with a single
>> thread & single process using multiplexed sockets via select() or
>> poll().
> 
> Then either files access in your server was blocking or you used
> non-portable extensions to POSIX.
> And it's not like on Windows it would be different. Except, may be, if
> you want to support very old versions of Windows (>20 y.o.) in
> whichcasee you'll only have select() and no poll(). Which is
> inconvinience, but relatively minor one.

Winnt 4.0 had IOCP that works with sockets and files.



> 
>> Thats how 1990s MUD & chat servers were written and IRC,
>> Unaxcess along with plenty of other in house company servers.
>>
> 
> 
> 

[toc] | [prev] | [next] | [standalone]


#124239

Fromboltar@caprica.universe
Date2026-07-09 08:55 +0000
Message-ID<112nnlq$1ne64$1@dont-email.me>
In reply to#124231
On Wed, 8 Jul 2026 22:16:55 +0300
Michael S <already5chosen@yahoo.com> gabbled:
>On Wed, 8 Jul 2026 09:34:40 -0000 (UTC)
>boltar@caprica.universe wrote:
>
>> On Tue, 7 Jul 2026 20:36:11 +0300
>> Michael S <already5chosen@yahoo.com> gabbled:
>> >On Tue, 7 Jul 2026 10:40:28 -0000 (UTC)
>> >boltar@caprica.universe wrote:  
>> >> Looks like windows maintains its own thread pool for a user which
>> >> seems wasteful   
>> >
>> >Why wasteful?
>> >If you don't use it, it costs you nothing.  
>> 
>> It costs the kernel time and resources or do you think its all done
>> by magic pixies?
>> 
>
>It costs only if you use it.
>Otherwise, accordiing to my understanding, the only cost is few
>zero-initialized fields in process control block.

Whooosh....

>> >I don't understand what you mean.
>> >IMHO, portable *nix is the one that needs threads (or fork) for
>> >everything.  
>> 
>> Wtf are you talking about? 
>
>I am talking about file IO. Was not it obvious?

No it wasn't and no you don't need seperate threads to do file I/O , you
can simply multiplex the descriptors in select or poll just like sockets.

>> Its quite possible - and I've done it a
>> number of times - to write a network server in unix with a single
>> thread & single process using multiplexed sockets via select() or
>> poll().
>
>Then either files access in your server was blocking or you used
>non-portable extensions to POSIX.

Clearly you don't understand how multiplexing works in unix but given file
I/O in userspace is buffered anyway you rarely need to multiplex file I/O
unless its via NFS or similar.

>And it's not like on Windows it would be different. Except, may be, if
>you want to support very old versions of Windows (>20 y.o.) in
>whichcasee you'll only have select() and no poll(). Which is
>inconvinience, but relatively minor one.

select and poll are not an "inconvenience", they're fundamental to how
single threaded servers are implemented on unix. Don't assume just because
the windows versions are a pale shadow of the posix ones doesn't mean that
they're useless.

[toc] | [prev] | [next] | [standalone]


#124242

Fromscott@slp53.sl.home (Scott Lurndal)
Date2026-07-09 15:18 +0000
Message-ID<iZO3S.321218$0CK1.7164@fx47.iad>
In reply to#124239
boltar@caprica.universe writes:
>On Wed, 8 Jul 2026 22:16:55 +0300
>Michael S <already5chosen@yahoo.com> gabbled:
>>On Wed, 8 Jul 2026 09:34:40 -0000 (UTC)
>>boltar@caprica.universe wrote:
>>
>>> On Tue, 7 Jul 2026 20:36:11 +0300
>>> Michael S <already5chosen@yahoo.com> gabbled:
>>> >On Tue, 7 Jul 2026 10:40:28 -0000 (UTC)
>>> >boltar@caprica.universe wrote:  
>>> >> Looks like windows maintains its own thread pool for a user which
>>> >> seems wasteful   
>>> >
>>> >Why wasteful?
>>> >If you don't use it, it costs you nothing.  
>>> 
>>> It costs the kernel time and resources or do you think its all done
>>> by magic pixies?
>>> 
>>
>>It costs only if you use it.
>>Otherwise, accordiing to my understanding, the only cost is few
>>zero-initialized fields in process control block.
>
>Whooosh....
>
>>> >I don't understand what you mean.
>>> >IMHO, portable *nix is the one that needs threads (or fork) for
>>> >everything.  
>>> 
>>> Wtf are you talking about? 
>>
>>I am talking about file IO. Was not it obvious?
>
>No it wasn't and no you don't need seperate threads to do file I/O , you
>can simply multiplex the descriptors in select or poll just like sockets.

Actually, you can't usefully poll regular files.  POLLIN and POLLOUT are always true for
a regular file.

aio_read(2), aio_write(2) and lio_listio(2) provide asynchronous
file I/O.


>
>>> Its quite possible - and I've done it a
>>> number of times - to write a network server in unix with a single
>>> thread & single process using multiplexed sockets via select() or
>>> poll().
>>
>>Then either files access in your server was blocking or you used
>>non-portable extensions to POSIX.
>
>Clearly you don't understand how multiplexing works in unix but given file
>I/O in userspace is buffered anyway you rarely need to multiplex file I/O
>unless its via NFS or similar.

No high performance application will use stdio buffering.

[toc] | [prev] | [next] | [standalone]


Page 2 of 10 — ← Prev page 1 [2] 3 4 … 10  Next page →

Back to top | Article view | comp.lang.c++


csiph-web