Allow platform references to be sent to background threads
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
co-authored by
Max Brunsfeld
parent
ebbe517bfa
commit
6daddf5146
@@ -12,15 +12,15 @@ use cocoa::base::{BOOL, NO, YES};
|
||||
pub use dispatcher::Dispatcher;
|
||||
pub use fonts::FontSystem;
|
||||
use platform::{MacMainThreadPlatform, MacPlatform};
|
||||
use std::rc::Rc;
|
||||
use std::{rc::Rc, sync::Arc};
|
||||
use window::Window;
|
||||
|
||||
pub(crate) fn main_thread_platform() -> Rc<dyn super::MainThreadPlatform> {
|
||||
Rc::new(MacMainThreadPlatform::default())
|
||||
}
|
||||
|
||||
pub(crate) fn platform() -> Rc<dyn super::Platform> {
|
||||
Rc::new(MacPlatform::new())
|
||||
pub(crate) fn platform() -> Arc<dyn super::Platform> {
|
||||
Arc::new(MacPlatform::new())
|
||||
}
|
||||
|
||||
trait BoolExt {
|
||||
|
||||
Reference in New Issue
Block a user