View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0004617 | Spring engine | General | public | 2014-11-13 03:13 | 2016-01-19 19:37 | ||||
Reporter | abma | ||||||||
Assigned To | gajop | ||||||||
Priority | normal | Severity | feature | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0004617: pr-downloader api | ||||||||
Description | for async: http://en.cppreference.com/w/cpp/thread/async for comm: std::future https://solarianprogrammer.com/2012/10/17/cpp-11-async-tutorial/ | ||||||||
Additional Information | use namespaces! (03:18:02) [LCC]jK: std::future (03:18:26) [LCC]jK: The template function async runs the function f asynchronously (potentially in a separate thread) and returns a std::future that will eventually hold the result of that function call. (03:19:25) [LCC]jK: so the lua function first returns the result of DownloadSearch() (03:20:14) [LCC]jK: and later lua calls a Spring....IsFinished() that checks if the std::future is ready and if so it returns the result | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
abma (administrator) 2014-11-13 03:20 |
Add a callin when download fails, with a reason why Make it async and add a callin when it succeeds Add callouts to stop, pause and list existing downloads with name, start time, progress (current bytes, total bytes), short name, current download speed and ETA (whatever prdownloader can provide) |
abma (administrator) 2015-01-26 14:32 Last edited: 2015-01-26 14:49 |
unassigned because i'm not actively working on it atm. to busy with other, also important stuff :-| proof of concept works: https://github.com/spring/spring/tree/pr-downloader note: gajop said he will continue this (not sure if thats still valid) |
gajop (developer) 2015-01-26 15:25 |
Yep, I'm working on it. It's going a bit slow because I'm also learning how engine does callins. I've got this so far: https://github.com/gajop/spring/commit/c0e562771f9df9ef95eca8d06904fdcf91f8a5c0 https://github.com/gajop/pr-downloader/commit/01f1505a5153199fcbf7ab664389a97dbee861ff It's kinda ugly, especially the pr-downloader part, but I'm just trying to get stuff working and I'll clean it up later. The main issue now is that I shouldn't be calling the event handler (and thus lua handler) from multiple threads (at the same time), but (according to jk) rather rely on the eventbatchhandler to queue up the events. There's still a bit of work to go before I ask for design/code comments and any pull requests can be made. |
jK (developer) 2015-01-27 06:54 |
why callins at all? |
gajop (developer) 2015-01-27 07:07 |
For the following things I think it's obvious why callins would be needed: - DownloadStarted (confirms that the provided game/map and its dependencies exists and their download has started) - DownloadFailed - DownloadFinished The only alternative would be to poll it on Update in the widget which seems really wrong. Spring.HasDownloadFinished ? -> no DownloadQueued is used to obtain a surrogate key instead of using the name+version combination in all other callins. For DownloadProgress it might make sense to consider polling instead, but I don't really see the benefit of that over the callin approach. With the callin we could better specify the update step (i.e. how often updates should be reported), and it should only be invoked when there's actually been a change. |
abma (administrator) 2015-09-16 23:51 |
https://github.com/spring/spring/pull/221 |
gajop (developer) 2016-01-19 19:37 |
the branch has been merged; future work should go to separate PRs/issues |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2014-11-13 03:13 | abma | New Issue | |
2014-11-13 03:13 | abma | Status | new => assigned |
2014-11-13 03:13 | abma | Assigned To | => abma |
2014-11-13 03:16 | abma | Description Updated | View Revisions |
2014-11-13 03:17 | abma | Additional Information Updated | View Revisions |
2014-11-13 03:18 | abma | Additional Information Updated | View Revisions |
2014-11-13 03:18 | abma | Additional Information Updated | View Revisions |
2014-11-13 03:20 | abma | Note Added: 0013821 | |
2015-01-03 04:20 | abma | Target Version | 99.0 => |
2015-01-26 14:31 | abma | Assigned To | abma => |
2015-01-26 14:32 | abma | Status | assigned => new |
2015-01-26 14:32 | abma | Note Added: 0013945 | |
2015-01-26 14:33 | abma | Note Edited: 0013945 | View Revisions |
2015-01-26 14:49 | abma | Note Edited: 0013945 | View Revisions |
2015-01-26 15:25 | gajop | Note Added: 0013946 | |
2015-01-27 06:54 | jK | Note Added: 0013947 | |
2015-01-27 07:07 | gajop | Note Added: 0013948 | |
2015-09-16 23:51 | abma | Note Added: 0015182 | |
2016-01-19 19:37 | gajop | Note Added: 0015543 | |
2016-01-19 19:37 | gajop | Status | new => closed |
2016-01-19 19:37 | gajop | Assigned To | => gajop |
2016-01-19 19:37 | gajop | Resolution | open => fixed |