{{ message }}
Further improve locking (Atomic)#91
Closed
zeripath wants to merge 2 commits into
Closed
Conversation
As a second step improving unrolled#90, switch from using a RWMutex to use an atomic.Value and a reconstruct functions to ensure that the current templates are referenced in the helper func instead of a global reference. Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Contributor
Author
zeripath
added a commit
to zeripath/render
that referenced
this pull request
May 12, 2021
As a second step improving unrolled#90, only lock when absolutely necessary and reconstruct functions to ensure that the current templates are referenced in the helper func instead of a global reference. Closes unrolled#91 Signed-off-by: Andrew Thornton <art27@cantab.net>
Closed
Contributor
Author
unrolled
pushed a commit
that referenced
this pull request
May 26, 2021
* Further improve locking (RWMutex version) As a second step improving #90, only lock when absolutely necessary and reconstruct functions to ensure that the current templates are referenced in the helper func instead of a global reference. Closes #91 Signed-off-by: Andrew Thornton <art27@cantab.net> * Use fsnotify if using Directory and expose CompileTemplates If setting IsDevelopment, if we can, use an FsWatcher to recompile the templates in a separate goroutine. This should definitely increase the performance of the Development server. In order to make Asset based Renders have the same improvement - now that render compilation properly locks the templates we can expose the CompileTemplates function and allow downstream users to call this independently when their templates need recompilation. Contains #92 Signed-off-by: Andrew Thornton <art27@cantab.net>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

As a second step improving #90, switch from using a RWMutex to use an
atomic.Value and a reconstruct functions to ensure that the current
templates are referenced in the helper func instead of a global
reference.
Close #92
Signed-off-by: Andrew Thornton art27@cantab.net