Search found 51 matches

by rpkelly
Jun 02, 2017 15:51
Forum: Windows
Topic: A fast CPRNG
Replies: 85
Views: 22449

Re: A fast CPRNG

Well Dave, I'm just another older guy now and pursue trout, salmon, and, grayling with my beloved bamboo with flies I tie. In between fishing trips, I sling a bit of code around and hike and travel with my wife who has beat me to retirement by a few years. I do like a pint a few times per month and ...
by rpkelly
Jun 02, 2017 14:38
Forum: Windows
Topic: A fast CPRNG
Replies: 85
Views: 22449

Re: A fast CPRNG

You are da man Dave. Have a pint on me....

Rick
by rpkelly
May 31, 2017 18:00
Forum: Windows
Topic: Windows Thread Pool
Replies: 17
Views: 5858

Re: Windows Thread Pool

This is why in my class, I don't reuse the TP_WORK object. I can pass whatever is needed at the time. ' ===================================================================================== ' Create Thread Work ' ===================================================================================== P...
by rpkelly
May 31, 2017 12:43
Forum: Windows
Topic: Windows Thread Pool
Replies: 17
Views: 5858

Re: Windows Thread Pool

Your comparison results are similar to mine although I only used 1000 threads.

Links I found useful for tuning of thread pools is at:

https://blogs.msdn.microsoft.com/pedram ... ol-thread/

http://www.thejoyofcode.com/Tuning_the_ThreadPool.aspx
by rpkelly
May 31, 2017 4:04
Forum: Windows
Topic: Windows Thread Pool
Replies: 17
Views: 5858

Re: Windows Thread Pool

Wow! Thanks for the feedback. The overhead for creating threads is higher than I had imagined and yours is the first proof that thread pools have their place. I'm looking forward towards throwing that proverbial brick wall at my SQLite server class. I have a connection pool class that manages the SQ...
by rpkelly
May 30, 2017 19:52
Forum: Windows
Topic: Windows Thread Pool
Replies: 17
Views: 5858

Re: Windows Thread Pool

You may be correct. I only included the environment api's since I thought threads working with SQLite would be thought of as "long". I have a lot of testing remaining and I'll find out when I throw a few hundred connections at my server class as fast as I can create them. 70 bits just mean...
by rpkelly
May 30, 2017 17:36
Forum: Windows
Topic: Windows Thread Pool
Replies: 17
Views: 5858

Re: Windows Thread Pool

Grab my class and sample script and with your work flow. I'd be interested in seeing if it holds up.

Welcome to the 64 bit world...
by rpkelly
May 30, 2017 15:44
Forum: Windows
Topic: Windows Thread Pool
Replies: 17
Views: 5858

Re: Windows Thread Pool

I'm the PB guy having transitioned to FB. I'm developing SQLite Client/Server classes when the whole threadpool api set came into view. See my take at: https://github.com/breacsealgaire/FreeBasic-32-64-Windows-SQLite-Class What I found out is that I can have a thread cleanup group without a callback...
by rpkelly
May 27, 2017 0:14
Forum: Projects
Topic: SQLite Windows Class
Replies: 9
Views: 3743

Re: SQLite Windows Class

Added a thread pool class that the server class will eventually use.

https://github.com/breacsealgaire/FreeB ... Lite-Class
by rpkelly
May 26, 2017 3:15
Forum: Windows
Topic: Windows Thread Pool
Replies: 17
Views: 5858

Re: Windows Thread Pool

Not knowing much about things, I put this small snippet of code together and it seems to work with both 32 and 64 bit compiles. const _WIN32_WINNT = &h0602 #INCLUDE ONCE "windows.bi" declare sub myThread (byval Instance as PTP_CALLBACK_INSTANCE, byval Context as PVOID, byval Work as PT...
by rpkelly
May 24, 2017 22:54
Forum: Windows
Topic: Windows Thread Pool
Replies: 17
Views: 5858

Windows Thread Pool

Does anybody have any experience using the windows thread pool api's, and, what are best practices?

1. CreateThreadpool
2. SetThreadpoolThreadMaximum
3. SetThreadpoolThreadMinimum
4. CreateThreadpoolWork
5. SubmitThreadpoolWork
6. CloseThreadpoolWork
7. CloseThreadPool
by rpkelly
May 15, 2017 22:30
Forum: Beginners
Topic: Thread Status without wait
Replies: 2
Views: 785

Thread Status without wait

If I run a CreateThread, can I use the thread handle returned with (Windows) WaitForSingleObject(hThread,0) = WAIT_OBJECT_0? When that is true, the thread should be done, and, now, free the thread handle using ThreadDetach?
by rpkelly
May 14, 2017 17:27
Forum: Projects
Topic: SQLite Windows Class
Replies: 9
Views: 3743

Re: SQLite Windows Class

This SQLite Windows collection is the beginning of a complete set of classes for a client/server group. Over the next several months, there are basically three additional classes. Socket (already in place with preliminary testing), Client, and, Server classes after which all the tools will be in pla...
by rpkelly
May 14, 2017 17:17
Forum: Projects
Topic: SQLite Windows Class
Replies: 9
Views: 3743

Re: SQLite Windows Class

Added Windows crypto class useful for SQLite client/server authentication with example of one way to design a handshake.