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

Gary D. Gregory commented on VFS-839:
-------------------------------------

Google translate says:

Google

translate

To Hindi
To English
Google
English to Spanish
Images
App
English to French
To Urdu
DeepL Translate
English to Tagalog
Voice
Perspectives
All filters
Chinese (Simplified)
English
当缓存的文件被全部清理后,会自动停止SoftRefReleaseThread线程,停止线程会清空fileSystemCache,softRefReleaseThread变量设为null,再将原来的线程中断,且线程安全;但是在停止SoftRefReleaseThread线程过程中,可能有新的线程从缓存获取文件,在

getOrCreateFilesystemCache方法中,当fileSystemCache为空时,会去启动新的SoftRefReleaseThread线程,但中断线程的方法还未将softRefReleaseThread变量设为null,线程不能被启动,且将fileSystem作为key放到fileSystemCache变量,非线程安全;导致SoftRefReleaseThread线程再也不能自动启动;

整体执行步骤见下图:
Dāng huǎncún de wénjiàn bèi quánbù qīnglǐ hòu, huì zìdòng tíngzhǐ 
SoftRefReleaseThread xiànchéng, tíngzhǐ xiànchéng huì qīngkōng 
fileSystemCache,softRefReleaseThread biàn liáng shè wèi null, zài jiāng yuánlái 
de xiànchéng zhōngduàn, qiě xiànchéng ānquán; dànshì zài tíngzhǐ 
SoftRefReleaseThread xiànchéng guòchéng zhōng, kěnéng yǒu xīn de xiànchéng cóng 
huǎncún huòqǔ wénjiàn, zài

getOrCreateFilesystemCache fāngfǎ zhōng, dāng fileSystemCache wèi kòng shí, huì 
qù qǐdòng xīn de SoftRefReleaseThread xiànchéng, dàn zhōngduàn xiànchéng de 
fāngfǎ hái wèi jiāng softRefReleaseThread biàn liáng shè wèi null, xiànchéng 
bùnéng bèi qǐdòng, qiě jiāng fileSystem zuòwéi key fàng dào fileSystemCache 
biànliàng, fēi xiànchéng ānquán; dǎozhì SoftRefReleaseThread xiànchéng zài yě 
bùnéng zìdòng qǐdòng;

zhěngtǐ zhíxíng bùzhòu jiàn xià tú:
When all the cached files are cleared, the SoftRefReleaseThread thread will be 
automatically stopped, the fileSystemCache will be cleared when the thread is 
stopped, the softRefReleaseThread variable will be set to null, and the 
original thread will be interrupted, and the thread is safe; but during the 
process of stopping the SoftRefReleaseThread thread, there may be new The 
thread fetches the file from the cache, in

In the getOrCreateFilesystemCache method, when the fileSystemCache is empty, a 
new SoftRefReleaseThread thread will be started, but the method of interrupting 
the thread has not yet set the softRefReleaseThread variable to null, the 
thread cannot be started, and the fileSystem is used as the key in the 
fileSystemCache variable, which is not thread-safe ;cause the 
SoftRefReleaseThread thread can no longer be automatically started;

The overall execution steps are shown in the figure below:
Feedback

Translate
App installed
Google Translate
Google's service, offered free of charge, instantly translates words, phrases, 
and web pages between English and over 100 other languages.
Detect language → English
About
Android
How can we help you?
Translate by speech
Translate documents & websites
Google Translate
App installed
People also ask
Is Google Translate 100% right?
What does Ingles mean in English?
What is the meaning of de nada?
What is the most accurate Chinese translator to English?
Feedback

Translate.com
https://www.translate.com
Translate.com: Online Translator
Expert language solutions for any size of business. 25K+ professional 
translators. 90 language pairs. 24/7 online translation service. API.
People also search for
Top stories

DeepL Translate
https://www.deepl.com › translator-...
DeepL Translate: The world's most accurate translator
Translate texts & full document files instantly. Accurate translations for 
individuals and Teams. Millions translate with DeepL every day.

Yandex Translate
https://translate.yandex.com › ...
Dictionary and online translation
Free online translation from English and other languages into Russian and back. 
The translator works with words, texts, web pages, and text in photos.

Google
https://chrome.google.com › detail
Google Translate
Mar 22, 2023 — View translations easily as you browse the web. By the Google 
Translate team. Highlight or right-click on a section of text and click on ...

> SoftRefReleaseThread线程close后,不能再次自动启动
> -------------------------------------
>
>                 Key: VFS-839
>                 URL: https://issues.apache.org/jira/browse/VFS-839
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.7.0
>         Environment: CentOS 7.4
> JDK 1.8
>            Reporter: fanshu
>            Priority: Major
>         Attachments: image-2023-07-11-10-07-44-143.png
>
>
> 当缓存的文件被全部清理后,会自动停止SoftRefReleaseThread线程,停止线程会清空fileSystemCache,softRefReleaseThread变量设为null,再将原来的线程中断,且线程安全;但是在停止SoftRefReleaseThread线程过程中,可能有新的线程从缓存获取文件,在
> getOrCreateFilesystemCache方法中,当fileSystemCache为空时,会去启动新的SoftRefReleaseThread线程,但中断线程的方法还未将softRefReleaseThread变量设为null,线程不能被启动,且将fileSystem作为key放到fileSystemCache变量,非线程安全;导致SoftRefReleaseThread线程再也不能自动启动;
> 整体执行步骤见下图:
> !image-2023-07-11-10-07-44-143.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to