mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-25 01:31:14 -06:00 
			
		
		
		
	Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer
This commit is contained in:
		
						commit
						be73962699
					
				
					 12 changed files with 219 additions and 38 deletions
				
			
		|  | @ -204,7 +204,6 @@ set(SLIC3R_GUI_SOURCES | |||
|     Utils/UndoRedo.hpp | ||||
|     Utils/HexFile.cpp | ||||
|     Utils/HexFile.hpp | ||||
|     Utils/Thread.hpp | ||||
| ) | ||||
| 
 | ||||
| if (APPLE) | ||||
|  |  | |||
|  | @ -23,6 +23,7 @@ | |||
| #include "libslic3r/GCode/PreviewData.hpp" | ||||
| #endif // !ENABLE_GCODE_VIEWER
 | ||||
| #include "libslic3r/Format/SL1.hpp" | ||||
| #include "libslic3r/Thread.hpp" | ||||
| #include "libslic3r/libslic3r.h" | ||||
| 
 | ||||
| #include <cassert> | ||||
|  | @ -36,7 +37,6 @@ | |||
| #include "I18N.hpp" | ||||
| #include "RemovableDriveManager.hpp" | ||||
| 
 | ||||
| #include "slic3r/Utils/Thread.hpp" | ||||
| #include "slic3r/GUI/Plater.hpp" | ||||
| 
 | ||||
| namespace Slic3r { | ||||
|  | @ -224,6 +224,9 @@ void BackgroundSlicingProcess::process_sla() | |||
| 
 | ||||
| void BackgroundSlicingProcess::thread_proc() | ||||
| { | ||||
|     set_current_thread_name("slic3r_BackgroundSlicingProcess"); | ||||
| 	name_tbb_thread_pool_threads(); | ||||
| 
 | ||||
| 	assert(m_print != nullptr); | ||||
| 	assert(m_print == m_fff_print || m_print == m_sla_print); | ||||
| 	std::unique_lock<std::mutex> lck(m_mutex); | ||||
|  |  | |||
|  | @ -1,6 +1,7 @@ | |||
| #include <algorithm> | ||||
| 
 | ||||
| #include "Job.hpp" | ||||
| #include <libslic3r/Thread.hpp> | ||||
| #include <boost/log/trivial.hpp> | ||||
| 
 | ||||
| namespace Slic3r { | ||||
|  |  | |||
|  | @ -3,7 +3,8 @@ | |||
| 
 | ||||
| #include <atomic> | ||||
| 
 | ||||
| #include <slic3r/Utils/Thread.hpp> | ||||
| #include "libslic3r/libslic3r.h" | ||||
| 
 | ||||
| #include <slic3r/GUI/I18N.hpp> | ||||
| 
 | ||||
| #include "ProgressIndicator.hpp" | ||||
|  |  | |||
|  | @ -1,28 +0,0 @@ | |||
| #ifndef GUI_THREAD_HPP | ||||
| #define GUI_THREAD_HPP | ||||
| 
 | ||||
| #include <utility> | ||||
| #include <boost/thread.hpp> | ||||
| 
 | ||||
| namespace Slic3r { | ||||
| 
 | ||||
| template<class Fn> | ||||
| inline boost::thread create_thread(boost::thread::attributes &attrs, Fn &&fn) | ||||
| { | ||||
|     // Duplicating the stack allocation size of Thread Building Block worker
 | ||||
|     // threads of the thread pool: allocate 4MB on a 64bit system, allocate 2MB
 | ||||
|     // on a 32bit system by default.
 | ||||
|      | ||||
|     attrs.set_stack_size((sizeof(void*) == 4) ? (2048 * 1024) : (4096 * 1024)); | ||||
|     return boost::thread{attrs, std::forward<Fn>(fn)}; | ||||
| } | ||||
| 
 | ||||
| template<class Fn> inline boost::thread create_thread(Fn &&fn) | ||||
| { | ||||
|     boost::thread::attributes attrs; | ||||
|     return create_thread(attrs, std::forward<Fn>(fn));     | ||||
| } | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| #endif // GUI_THREAD_HPP
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 enricoturri1966
						enricoturri1966