61 |
|
} |
62 |
|
public void DestroyInstance() |
63 |
|
{ |
64 |
< |
xmltv_logger.Log.Debug.WriteLine("Destoying Instance of: '{0}'", this.GetType().Name); |
64 |
> |
xmltv_logger.Debug.WriteLine("Destoying Instance of: '{0}'", this.GetType().Name); |
65 |
|
this.IsAborting = true; |
66 |
|
if (worker == null) |
67 |
|
{ |
68 |
< |
xmltv_logger.Log.Debug.WriteLine("Unable to destroy instance of: '{0}' - worker thread is null", this.GetType().Name); |
68 |
> |
xmltv_logger.Debug.WriteLine("Unable to destroy instance of: '{0}' - worker thread is null", this.GetType().Name); |
69 |
|
return; |
70 |
|
} |
71 |
|
else |
72 |
|
{ |
73 |
|
if (worker.IsAlive) |
74 |
|
{ |
75 |
< |
xmltv_logger.Log.Verbose.Debug.WriteLine("Requesting Instance to Abort..."); |
75 |
> |
xmltv_logger.Verbose.Debug.WriteLine("Requesting Instance to Abort..."); |
76 |
|
while (worker.IsAlive) |
77 |
|
{ |
78 |
|
worker.Abort(); |
81 |
|
} |
82 |
|
else |
83 |
|
{ |
84 |
< |
xmltv_logger.Log.Debug.WriteLine("Instance of: '{0}'- already destroyed.", this.GetType().Name); |
84 |
> |
xmltv_logger.Debug.WriteLine("Instance of: '{0}'- already destroyed.", this.GetType().Name); |
85 |
|
} |
86 |
|
} |
87 |
|
} |