Free Software Library!

This is a discussion on Free Software Library! within the C++ Programming forums, part of the General Programming Boards category; Well, sort of Basically, I am trying to get people interested in my software components so that one day I ...

Free Software Library!

Well, sort of Basically, I am trying to get people interested in my software components so that one day I may perhaps make my living developing them! Sounds kinda kooky, huh? Anyway, here is my first offering: A multithreaded C++ class called QuickThread. Basically, it lets you pack as many void(*)(void) functions into it as you wish, and then runs them continuously in sequence. Adding, removing, starting, stopping, suspending are all as easy as calling a single function. So the point is the class was made for ease of use, targeted toward the beginner but fun enough for the expert. Try it out! The software is free, but not open-source. You may use it for whatever you'd like, both commercial and otherwise - there is no license.

Any comments, complaints, suggestions? Looking for something even more powerful, perhaps? Maybe the end-all-be-all multithreading library? I've got it! But I would like a little feedback on this one first, please . For the reluctant, I will illustrate example one from the package...

I'll let the programmer implement these on his own. Thay are applied to the data structures, and can be easily implemented anyhow.

BTW, your example1.exe doesn't suspend the threads at all. It just floods the screen with text too fast to read.

You misunderstand. Notice that the screen pauses and then continues. This was where ::Suspend() was called The QuickThread object executes the functions passed to it continuously. With exception to printing and other purposes, you will want the functions to run quickly. To slow them down, you should place a call to Sleep() in each function or similar.

I don't like this syntax at all.

Really, so don't use that syntax. I provided it as a clearer way to place functions into the object. Look at both ways:

I know what the problem is now.
Instead of waiting three seconds (Sleep(3000)) it waited about six seconds for some reason (not your fault).

I have one question, though.
First, let me point out that I've never worked that much with functions that take a variable amount of arguments.
But every use of it I've seen has either used an integer specifying the number of arguments or passing a zero pointer at the end.
Like this:

Code:

func(3,arg1,arg2,arg3);
//or
func(arg1,arg2,arg3,0);

How come your implementation works without using any of these techniques?

Finally, well, what kind of response did you expect? It's a good library, but it has no great advantage over Win32 API. I don't think my "random comments" have been too negative. An advanced programer like you must be able to cope with them.