Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Jan 26, 2013 at 10:51 AM by Fattie for the following reason:

Question is off-topic or not relevant

avatar image
0
Question by DayyanSisson · Jan 26, 2013 at 07:43 AM · threadscpu

Threading. What is it?

I'm pretty new to game development, and don't know too much about computers specifically, but one optimization technique I've been hearing is threading. I've been hearing things like, "Run it on a second thread, which will make it run much faster," and such and I've been given that advice, but have never known what to do with it. What I do know is that its used to optimize and decrease CPU overhead. I've sort of pieced together this image that it runs the code separately from the rest of the code because it's only using certain API to perform its tasks. But I'm not sure if thats right, or if its the complete picture. So I've been searching online for a little while and didn't exactly find the answers I was looking for.

So my question is: what is threading, what is it useful for, and how should I implement it in Unity? Thanks a ton!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

  • Sort: 
avatar image
1

Answer by Julien-Lynge · Jan 26, 2013 at 07:48 AM

This isn't a Unity question, and so probably isn't appropriate for this answer site. This is a programming question, and one that has been answered many times in sites like Stack Overflow, not to mention in introductory books on programming or computer science.

Before we answer any questions, I suggest a Google search. Try starting with "programming what is threading" and look at the Wikipedia article, Apple article, Microsoft article, ...

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Julien-Lynge · Jan 26, 2013 at 07:51 AM 0
Share

BTW: this wasn't meant to be purely snark. Your second question (how should I implement it in Unity) is Unity-related, but is meaningless until you understand threading. (And, by the way, it's a question I guarantee you can find a lot of information on by searching here and in the forums, hint hint)

avatar image
0

Answer by schaddem · Jan 26, 2013 at 07:57 AM

http://en.wikipedia.org/wiki/Multithreading_%28software%29#Multithreading

As far as implementing in Unity goes, there's probably no need. Have a look at Coroutines instead.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Julien-Lynge · Jan 26, 2013 at 08:01 AM 0
Share

You're definitely correct in many beginner cases. However, there is a legitimate need if you want to take advantage of other cores for intensive calculations, especially parallel calculations. Coroutines won't get you there.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

How do I call a function in a different CPU core? 2 Answers

How can I get the number of physical cores in the CPU (not logical cores) 1 Answer

What is VFP? 1 Answer

Loading.ReadObject CPU Spike 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges