mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 09:55:41 +02:00
Make file positions and lengths thread-safe
This commit is contained in:
+7
-1
@@ -1,12 +1,18 @@
|
||||
#ifndef MEMFILE_HPP
|
||||
#define MEMFILE_HPP
|
||||
|
||||
#include <atomic>
|
||||
|
||||
struct memfile {
|
||||
int fd = 0;
|
||||
char *map = NULL;
|
||||
long long len = 0;
|
||||
std::atomic<long long> len;
|
||||
long long off = 0;
|
||||
unsigned long tree = 0;
|
||||
|
||||
memfile()
|
||||
: len(0) {
|
||||
}
|
||||
};
|
||||
|
||||
struct memfile *memfile_open(int fd);
|
||||
|
||||
Reference in New Issue
Block a user