Ignore:
Timestamp:
Jun 19, 2010, 12:23:08 PM (12 years ago)
Author:
Sven Rech
Message:

quadratic sieve changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/QuadraticSieve/QuadraticSieve.cs

    r1676 r1678  
    106106            quadraticSieveQuickWatchPresentation.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
    107107            {
    108                 quadraticSieveQuickWatchPresentation.peer2peer.Visibility = settings.UsePeer2Peer ? Visibility.Visible : Visibility.Collapsed;
    109                 quadraticSieveQuickWatchPresentation.Redraw();
     108                quadraticSieveQuickWatchPresentation.peer2peer.Visibility = settings.UsePeer2Peer ? Visibility.Visible : Visibility.Collapsed;               
    110109                quadraticSieveQuickWatchPresentation.timeLeft.Text = "?";
    111110                quadraticSieveQuickWatchPresentation.endTime.Text = "?";
     
    136135                    quadraticSieveQuickWatchPresentation.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
    137136                    {
    138                         quadraticSieveQuickWatchPresentation.peer2peer.Visibility = settings.UsePeer2Peer ? Visibility.Visible : Visibility.Collapsed;
    139                         quadraticSieveQuickWatchPresentation.Redraw();
     137                        quadraticSieveQuickWatchPresentation.peer2peer.Visibility = settings.UsePeer2Peer ? Visibility.Visible : Visibility.Collapsed;                       
    140138                    }, null);
    141139                }
     
    735733            if (conf_list != null)
    736734            {
    737                 running = false;
     735                running = false;               
     736
     737                MethodInfo stop = msieve.GetMethod("stop");
     738                MethodInfo getObjFromConf = msieve.GetMethod("getObjFromConf");
     739
     740                conf_listMutex.WaitOne();
     741                foreach (Object conf in conf_list)
     742                    if (conf != null)
     743                        stop.Invoke(null, new object[] { getObjFromConf.Invoke(null, new object[] { (IntPtr)conf }) });
     744
     745                conf_list = null;
     746                conf_listMutex.ReleaseMutex();
     747
    738748                if (usePeer2Peer)
    739749                    peerToPeer.StopLoadStoreThread();
    740 
    741                 MethodInfo stop = msieve.GetMethod("stop");
    742                 MethodInfo getObjFromConf = msieve.GetMethod("getObjFromConf");
    743 
    744                 conf_listMutex.WaitOne();
    745                 foreach (IntPtr conf in conf_list)
    746                     if (conf != null)
    747                         stop.Invoke(null, new object[] { getObjFromConf.Invoke(null, new object[] { conf }) });
    748 
    749                 conf_list = null;
    750                 conf_listMutex.ReleaseMutex();
    751750
    752751                GuiLogMessage("Waiting for threads to stop!", NotificationLevel.Debug);
Note: See TracChangeset for help on using the changeset viewer.