Comments (2)
I'm sorry. I did read the section and understand the gist of it but can't say I get every single detail. As you say multithreading is indeed pretty complex. Which is exactly why I decided to make post an issue. I suppose what I was basically asking was if the shared/regular mutexes were capable of protecting the static and internal data structures but didn't know how to phrase it. But thank you you answered my question.
from dataframe.
First, read the multithreading section in the documentation.
There are two levels of protection you need.
- You need to protect the DataFrame static and internal data structures that are hidden. For that, you must use my spin lock and call set_lock()
- You also have to protect the DataFrame columns that are exposed to the user, if a single instance of DataFrame is accessed from multiple threads. For that you can use your own separate lock (or my spin lock). It is up to you.
In general, multithreading is not as straightforward as it may sound. It requires very careful analysis and especially repeated benchmarking and tweaking. Often it is counterproductive. It also differs from one platform to another, because it depends on a particular hardware.
If you are new to multithreaded programming, I suggest you start with a single thread and maybe use the async
interfaces. Once it works correctly, you can convert it to multithreaded version and compare results and efficiency and repeatedly tweak it
from dataframe.
Related Issues (20)
- No write to file example HOT 4
- Dataframe length HOT 2
- Plausibility of adapting for C++17 in a fork? HOT 2
- How to filter the DataFrame? HOT 1
- conflict with include <windows.h> HOT 1
- Aggregate visitors can't be used in groupby HOT 3
- Error: specializing member ‘hmdf::DataFrame<int, hmdf::HeteroVector<0> >::set_lock’ requires ‘template<>’ syntax| HOT 9
- DateTime: Issue with parsing ISO datetime HOT 6
- StdVisitor error with user-defined type HOT 4
- in dynamic libraries, get_column returns an empty data vector HOT 10
- MedianVisitor giving wrong result HOT 2
- Issues while compiling with DataFrame headers HOT 4
- test failed HOT 2
- load_column from single_act_visit.get_result() HOT 3
- failed to compile tests and examples in ubuntu HOT 2
- The `DataFrame.h` occurred an error: `In included file: unknown type name 'requires'` HOT 3
- Compile Failed with `VERSION 2.0.0` HOT 3
- How can I convert the `Eigen Matrix` to `DataFrame` or `DataFrame` to `Eigen Matrix`? HOT 4
- Error compiling on Linux x86_64 with g++ 14.0.1 or Clang 17.0.6 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dataframe.