Asynchronous multi-thread file processing method and device and storage medium
The invention relates to an asynchronous multi-thread file processing method and device and a storage medium, and the method comprises the following steps: carrying out segmentation processing on a to-be-written large data volume file to form data pages, storing the data pages according to the pages...
Saved in:
Main Authors | , , , , , |
---|---|
Format | Patent |
Language | Chinese English |
Published |
08.03.2024
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | The invention relates to an asynchronous multi-thread file processing method and device and a storage medium, and the method comprises the following steps: carrying out segmentation processing on a to-be-written large data volume file to form data pages, storing the data pages according to the pages, and obtaining a file set of the to-be-written file based on a preset single file size; when the file set is not empty, a preset semaphore is configured to be in a first state, files are written into a target position one by one in a single-thread mode, after writing is completed, the semaphore is configured to be in a second state, and the step is repeatedly executed till the file set is empty; and for a reading process, performing multi-process concurrent query on the premise that the semaphore is configured to be in the second state. Compared with the prior art, the method has the advantages that the read-write efficiency of large-data-volume files is high, read-write thread separation is achieved, and write th |
---|---|
Bibliography: | Application Number: CN202311661885 |