-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Library concurency refactoring #73
Conversation
experimental usage of lambdas inside BaseSqlTableModel. Lots of rewrights ahead.
…l select from GUI Thread
AnalysisLibraryTableModel, MixxxLibraryFeature, SetLogFeature (added special signal).
"isBusy"). Implemented "widget grey out" strategy when applying lambdas.
database connection.
logical misunderstanding with isBusy at [Playlist], avoided race condition in mixxxlibraryfeature.cpp.
onSearch() of DlgAnalysis, DlgAutoDJ, DlgHidden to avoid race conditions.
BasqSqlTableModel into db access and population of results.
Rewrighted access to UI elements.
Added (IN COMMENTS WITH TEXT "// USAGE OF FIFO") usage of FIFO, but it crashes. May be I missed something.
situations like as in HiddenTableModel -- "callSync".
I've added that to the list. If you have a idea how you've done that, that would be nice. Maybe by some friend-class or sth. like this? |
Just thought about it again. What do you want to be testable? If the access to the db is done right or all the individual functions if they do things right? |
I original meant that we are able to add uinttests that verifies the new API works as desired. |
I have managed to recall the private DB access idea: The lambdas are called here:
Here: https://github.com/troyane/mixxx/blob/LibraryConcurencyRefactoring/src/dlgautodj.cpp#L53 If we change the lambda prototype to
and invoke it by
in TrackCollection. This dos not entirely hide the TrackCollection functions, but the instance pointer to it. In a next step we may split TrackCollection in a way, that the library access functions are divided between GUI thread functions and TrackCollection thread functions. What do you think? |
Thats neat! I would prefer this over the current solution a lot, because the Compiler prevents wrong usage then! So we should go this way i think. That i would not fear that much that we Miss a call somewhere and generate a Party stopper by that. At the Moment I think it will be easier to Start from current master with this and maybe reuse the trackcollection parts with handling and locking the lambdas. The Main executer would be usable as well maybe. But we should stay on track with 1.12 release at first. Any point i can help there? Is it only Windows making problems? |
We have still a long list of 1.12.0 bugs any help is appreciated. |
For this branch: |
I'm looking for a solution to hide the database-access from everywhere except the lambdas. I like your proposal to make the lambda prototype The TrackCollection instance is already moved to Are these assumptions correct? |
Hello, @daschuer @MK-42 @rryan! I'm happy to hear that this branch is resurrected and someone is still interested in such tricky (but working) approach to this task. It will be pleasant to me if this branch will be merged :) I want to help, so I'll try to find several hours each week to help. |
Welcome back @troyane ! I noticed that I've missed something in my last comment: Would it make sense to do this change right from the start - to prevent wrong usage? This will not make the PR much larger but safer or what do you think? |
|
The problem is the following:
what would be called like
but no one except the TrackCollection itself has a reference to I hope I stated everything right, @daschuer, correct me if I'm wrong. Maybe it would make sense to then call |
Any opinions on splitting these two classes now in the current state of the branch and then merging against master? That would make sure (i think) that no code can call the DB the wrong way. |
@troyane: I am happy you are still taking care for your baby. Thank you. @MK-42: sorry for the late responds. I think you got the issue correct.
This sounds reasonable, if there are not much changes in TrackCollection since splitting out this branch. I am afraid doing the entire split will be quite hard, because of all the criss cross dependencies inside |
There was some code added to introduce sorting and like in SQLite3 I think. But no major changes except from that one. I'm working on the Split of these classes right now and making good progress... The Library-Scanner will be tricky though |
my work of the last day.... https://github.com/MK-42/mixxx/tree/LibraryConcurencyRefactoring The LibraryScanner has some direct references to the db and uses its own daos... maybe @troyane or @daschuer can explain how this actually works so that I can bring in the split there too? nervous to see if this will work :) |
If you do a PR to this branch, we can use the nice GitHub features. |
Superseded by #629. |
Remove MP3 streaming troubleshooting information.
Bypass mime type lookup from content for .flac files
use international y-m-d format for news dates
Hi, developers!
I need to get your code review.
Here is my branch "LibraryConcurencyRefactoring" developed as Google Summer of Code 2013 project.
Here you can read about our implemented ideas: http://mixxx.org/wiki/doku.php/lambda_scheme.
You can contact me via GitHub -- https://github.com/troyane, e-mail -- troyan3 at gmail dot com, or at mixxx irc channel -- tro.
P. S. There are some known issues with Rhythmbox playlist. It will be solved soon.