File tree Expand file tree Collapse file tree 3 files changed +0
-42
lines changed Expand file tree Collapse file tree 3 files changed +0
-42
lines changed Original file line number Diff line number Diff line change @@ -321,20 +321,6 @@ impl Debug for Generator {
321321 }
322322}
323323
324- // Releasing `UniquePtr<Generator>` invokes joining threads.
325- // However, on Windows, this causes a deadlock.
326- // As a workaround, it is bypassed here.
327- // See also https://github.com/jkawamoto/ctranslate2-rs/issues/64
328- #[ cfg( target_os = "windows" ) ]
329- impl Drop for Generator {
330- fn drop ( & mut self ) {
331- let ptr = std:: mem:: replace ( & mut self . ptr , UniquePtr :: null ( ) ) ;
332- unsafe {
333- std:: ptr:: drop_in_place ( ptr. into_raw ( ) ) ;
334- }
335- }
336- }
337-
338324/// The set of generation options.
339325///
340326/// # Examples
Original file line number Diff line number Diff line change @@ -566,20 +566,6 @@ impl Debug for Translator {
566566 }
567567}
568568
569- // Releasing `UniquePtr<Translator>` invokes joining threads.
570- // However, on Windows, this causes a deadlock.
571- // As a workaround, it is bypassed here.
572- // See also https://github.com/jkawamoto/ctranslate2-rs/issues/64
573- #[ cfg( target_os = "windows" ) ]
574- impl Drop for Translator {
575- fn drop ( & mut self ) {
576- let ptr = std:: mem:: replace ( & mut self . ptr , UniquePtr :: null ( ) ) ;
577- unsafe {
578- std:: ptr:: drop_in_place ( ptr. into_raw ( ) ) ;
579- }
580- }
581- }
582-
583569/// A translation result.
584570///
585571/// This struct is a Rust binding to the
Original file line number Diff line number Diff line change @@ -395,20 +395,6 @@ impl Debug for Whisper {
395395 }
396396}
397397
398- // Releasing `UniquePtr<Whisper>` invokes joining threads.
399- // However, on Windows, this causes a deadlock.
400- // As a workaround, it is bypassed here.
401- // See also https://github.com/jkawamoto/ctranslate2-rs/issues/64
402- #[ cfg( target_os = "windows" ) ]
403- impl Drop for Whisper {
404- fn drop ( & mut self ) {
405- let ptr = std:: mem:: replace ( & mut self . ptr , UniquePtr :: null ( ) ) ;
406- unsafe {
407- std:: ptr:: drop_in_place ( ptr. into_raw ( ) ) ;
408- }
409- }
410- }
411-
412398unsafe impl Send for ffi:: Whisper { }
413399unsafe impl Sync for ffi:: Whisper { }
414400
You can’t perform that action at this time.
0 commit comments