我在单击按钮时使用 window.open() ,并在该页面上使用 window.print() 。如果我只是关闭带有打印对话框的窗口(没有选择“保存”或“取消”),则 Google Chrome 中的父页面将变得无响应。
它与其他浏览器配合良好。
任何人都可以帮忙解决这个问题吗?
我们已经实现了将文件上传到box.net的队列。所有文件上传成功。但是,我一周内遇到1或2次以下异常。我找不到此异常的任何原因。
异常消息:
威胁已经被清除了。
异常源:
mscorlib
Exception-StackTrace:
在Box的System.Threading.Monitor.ObjWait(布尔值exitContext,Int32毫秒超时,对象obj)在Box。 C:\ Project \ BackupProjects \ BoxNetFileUpload \ Box.netAPIWebApp \ Source \ Service \ BoxService.cs:line 90中的.netAPIWebApp.Service.BoxService.monitorOnUploadQueue()
有人可以帮忙吗?
private static readonly BoxService instance = new BoxService();
private Queue<FileCabinetUploadHistory> uploadQueue = new Queue<FileCabinetUploadHistory>();
private BoxService()
{
Thread monitorThread = new Thread(new ThreadStart(monitorOnUploadQueue));
monitorThread.Start();
}
private FileCabinetUploadHistory RemoveFromUploadQueue()
{
lock (uploadQueue)
{
return uploadQueue.Dequeue();
}
}
private void monitorOnUploadQueue()
{
FileCabinetUploadHistory fileCabinetUploadHistory = null;
try
{
while (true)
{
if (uploadQueue.Count < 1)
{
lock (uploadQueue)
{ …Run Code Online (Sandbox Code Playgroud)