[ 
https://issues.apache.org/jira/browse/SHIRO-796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17226777#comment-17226777
 ] 

Boris Petrov commented on SHIRO-796:
------------------------------------

[~bdemers] I don't have a suggestion as a replacement unfortunately. I'm not 
sure, however, that Loom is years out - actually I think it will be here sooner 
rather than later. It's not something urgent, I just pointed out that some 
thinking is good to start. :)

As for what you said in the "NOTE" - how does one do that? Of course I might 
not use the thread local storage, but Shiro still writes/reads it (which will 
cause issues in Loom for example). Is there some way to instruct Shiro to not 
touch the thread local storage at all (leaving the application to handle itself 
getting the current Subject)? Also, do you know what the "async web apps" do 
about that?

> Move away from ThreadLocals
> ---------------------------
>
>                 Key: SHIRO-796
>                 URL: https://issues.apache.org/jira/browse/SHIRO-796
>             Project: Shiro
>          Issue Type: Improvement
>    Affects Versions: 1.7.0
>            Reporter: Boris Petrov
>            Priority: Major
>              Labels: loom, threadlocal
>
> Somewhat related to https://issues.apache.org/jira/browse/SHIRO-763.
> Shiro is using thread local variables a lot but they are generally 
> frowned-upon and also the upcoming Project Loom could have problems with 
> them. Projects are encouraged to move away from thread locals. It would be 
> nice for Shiro to also do that.
> Some references:
> [https://channel9.msdn.com/Events/Java/JDConf-2020/Prepare-for-What-Looms-Ahead]
> [https://www.javaadvent.com/2019/12/project-loom.html]
> [https://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to