Skip to content
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

csharp_尤忆晨_无23 #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

csharp_尤忆晨_无23 #5

wants to merge 1 commit into from

Conversation

youyc22
Copy link

@youyc22 youyc22 commented Jul 14, 2023

No description provided.

@@ -65,6 +65,62 @@ public interface ILongProgressByTime

public class LongProgressByTime: ILongProgressByTime
{
private long startTime; // 进度条开始时间
private long needTime; // 当前Progress完成所需时间
private bool isTerminated; // 进度条是否已终止
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有采用任何锁或者原子操作保证线程安全


public bool TrySet0()
{
if (!isTerminated)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可能是题目表述不清楚,当进度条时间满时应当视为终止

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants