-
Notifications
You must be signed in to change notification settings - Fork 146
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
3.0.0-preview4, batch rendering, async, server-side #24
Merged
+1,306
−374
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f9ca4a8
Implement call buffer, async
WilStead 4793328
Initialize semaphore
WilStead d72451c
Server-side batch rendering, test
WilStead 0ea5d97
README changes
WilStead 1751b93
Update CI build to use .NET Core 3.0 preview
WilStead 7079444
Update README
WilStead a1e5162
Updated to v3.0.0-preview4
WilStead 039124c
Remove references to myget
WilStead 5b68837
Fix YAML
WilStead 342d375
Update .NET Core preview version in CI build
WilStead 2f7a17e
Fixed SDK YAML tasks
WilStead File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@inherits BECanvasComponent | ||
|
||
<canvas id="@Id" width="@Width" height="@Height" ref="_canvasRef"></canvas> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how easy it would be but what if you make this return an
IDisposable
which callsEndBatchAsync
on disposal. The syntax would look something like this:However I'm not sure if this is going to work because of all the
async
stuffThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do like the fact that this paradigm prevents accidentally beginning a batch and forgetting to end it. You're correct that the
async
"end batch" call complicates things, though. I could probably implement it using either a 'fire-and-forget' task, or a blocking call like the ones that are currently used in the old API wrappers. Either solution has a few major drawbacks, though, and I'm not sure they would be good solutions.A fire-and-forget
async
call in aDispose
method would mean that the operation isn't necessarily complete after control exits the using block, and there would be no way toawait
on it. That would prevent any follow-up code that depends on the operations inside the block being actually finished. Probably not feasible from a usability perspective.A blocking call avoids that issue, but it has another problem: what if the
EndBatchAsync
call fails?Dispose
isn't supposed to fail, andusing
statements tend to swallow exceptions in theirtry
block if thefinally
block also throws. In the worst case the call might block indefinitely, leaving the thread blocked in theusing
statement's impliedfinally
clause.The
IAsyncDisposable
proposal aims to resolve these concerns and some others. If it makes it into c# 8.0 we could take advantage of it. That proposal has been around a while, though, and I haven't seen any official word that it's going to arrive soon.