Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
ed3b4a2f
Commit
ed3b4a2f
authored
12 years ago
by
Alex Buts
Browse files
Options
Downloads
Patches
Plain Diff
refs #6362 attempt to fix mutexing issue on Unix
(not fully tested yet on Win but there are hopes. )
parent
da9accaf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/Framework/Kernel/inc/MantidKernel/MultiThreaded.h
+2
-1
2 additions, 1 deletion
.../Mantid/Framework/Kernel/inc/MantidKernel/MultiThreaded.h
Code/Mantid/Framework/Kernel/src/DiskBuffer.cpp
+2
-1
2 additions, 1 deletion
Code/Mantid/Framework/Kernel/src/DiskBuffer.cpp
with
4 additions
and
2 deletions
Code/Mantid/Framework/Kernel/inc/MantidKernel/MultiThreaded.h
+
2
−
1
View file @
ed3b4a2f
...
...
@@ -12,7 +12,8 @@ namespace Kernel
// Typedefs for ThreadPool
/// General mutex (typedef'd to Poco::FastMutex). Not recursive in general; don't assume it is!
typedef
Poco
::
FastMutex
Mutex
;
typedef
Poco
::
FastMutex
NonRecursiveMutex
;
typedef
Poco
::
Mutex
Mutex
;
}
//namespace
}
//namespace
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/Framework/Kernel/src/DiskBuffer.cpp
+
2
−
1
View file @
ed3b4a2f
...
...
@@ -69,6 +69,7 @@ namespace Kernel
// And put it in the queue of stuff to write.
// std::cout << "DiskBuffer adding ID " << item->getId() << " to current size " << m_writeBuffer.size() << std::endl;
// TODO: check what happens when the same element is inserted with different size
std
::
pair
<
writeBuffer_t
::
iterator
,
bool
>
result
=
m_writeBuffer
.
insert
(
item
);
// Result.second is FALSE if the item was already there
...
...
@@ -95,11 +96,11 @@ namespace Kernel
*/
void
DiskBuffer
::
objectDeleted
(
const
ISaveable
*
item
)
{
m_mutex
.
lock
();
// const uint64_t sizeOnFile
size_t
id
=
item
->
getId
();
uint64_t
size
=
item
->
getDataMemorySize
();
m_mutex
.
lock
();
// Take it out of the to-write buffer
writeBuffer_byId_t
::
iterator
it2
=
m_writeBuffer_byId
.
find
(
id
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment