Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for Silicomancerâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #281486 |
@dmckee I am not sure about QFile/QTextStream performance. Current code uses them, so I will give them a try. For the moment I would like to get rid of the central writer thread. Question is still open: Is it allowed to call QFile and QTextStream methods from multiple threads (with or without a mutex... (more) |
— | over 3 years ago |
Comment | Post #281496 |
@ArtOfCode I guess the second notification was due to my successful retry. I deleted that one as well. However this means the failed tries didn't create any notifications. (more) |
— | over 3 years ago |
Comment | Post #281496 |
First one was "Your solution is how I have solved it currently (well, a bit more complex but it boils down exactly to your idea). However moving the file work into a single writer thread does not scale." But as I said, other comments also didn't work. I tried many times. I just retried and now it wor... (more) |
— | over 3 years ago |
Edit | Post #281486 |
Post edited: |
— | over 3 years ago |
Edit | Post #281496 | Initial revision | — | over 3 years ago |
Question | — |
Comments do not appear I Just tried to post a comment to this answer: https://software.codidact.com/posts/281493#answer-281493 But it didn't work. I could click "Post" but no comment appeared. I tried different sentences, none worked. I could successfully post a comment to my previous meta question: https://sof... (more) |
— | over 3 years ago |
Comment | Post #281491 |
@Alexei I see, thanks! Any statement about the 6. tag? (more) |
— | over 3 years ago |
Edit | Post #281486 |
Post edited: |
— | over 3 years ago |
Edit | Post #281491 |
Post edited: |
— | over 3 years ago |
Edit | Post #281491 | Initial revision | — | over 3 years ago |
Question | — |
Editing tags failed? I edited the tags of my very first Codidact question: https://software.codidact.com/posts/281486 Someone proposed the "python" tag. Since I am working with C++, I removed the "multithreading" tag and added "C++". (I am not sure if that was a good idea. But that is not my problem.) Current state ... (more) |
— | over 3 years ago |
Edit | Post #281486 |
Post edited: |
— | over 3 years ago |
Edit | Post #281486 |
Post edited: |
— | over 3 years ago |
Edit | Post #281486 | Initial revision | — | over 3 years ago |
Question | — |
Write to same file from multiple threads I want to write a text file from multiple threads. The file structure is line-oriented. This means writing of lines should be atomic. I am using Qt 5.15.2. Is it enough to protect a shared QTextStream/QFile pair using a QMutex? EDIT: For now using dmckee's†solution I have solved it (well... (more) |
— | over 3 years ago |