mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Make newUnnamedFile() threadsafe
This commit is contained in:
parent
922d48da27
commit
5c431b9335
@ -47,6 +47,7 @@
|
||||
#include "support/filetools.h"
|
||||
#include "support/gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "support/mutex.h"
|
||||
#include "support/textutils.h"
|
||||
|
||||
using namespace std;
|
||||
@ -172,9 +173,10 @@ Buffer * newFile(string const & filename, string const & templatename,
|
||||
Buffer * newUnnamedFile(FileName const & path, string const & prefix,
|
||||
string const & templatename)
|
||||
{
|
||||
// FIXME THREAD
|
||||
static map<string, int> file_number;
|
||||
static Mutex mutex;
|
||||
|
||||
Mutex::Locker locker(&mutex);
|
||||
FileName filename;
|
||||
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user