flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Ali.Z 24 Jan 2025, 06:08
a simple win32 utility that converts windows CR,LF to unix LF.
using threads to process drag and drop event, which doesnt block the gui from processing events. it spawns n-threads, where n is count of total files dropped. the dropped files must be null terminated ansi strings. use at your own risk, aliz. ![]() update1: copy paste errors. update2: fix textout transparency.
_________________ Asm For Wise Humans |
|||||||||||
![]() |
|
Ali.Z 24 Jan 2025, 21:58
the thing can be generlized to:
a - for every drop message spawn a thread that: - 1 - query number of dropped files - 2 - allocate memory that holds drop context structure to be passed to the thread - 3 - spawn child thread and pass it its own drop context b - complete last job, wait for all child threads and only then free memory even tho the source is included, i wouldnt generally recommend this design, i can refactor this multiple times to produce even better versions. (e.g.1 divide number of files and give each thread multiple files, e.g.2 let main thread query all dropped file names and free memory and only then spawn childs to process them, e.g.3 use async file i/o, etc.) regardless, it is a good example for others to learn about threading. _________________ Asm For Wise Humans |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.